Question

in matlab

It takes approximately 11,000 liters (3,000 gallons) [BBC] to make a pair of jeans. To make a shirt it takes about 2700 liters (713 gal), and for socks I assume it is shirt/12 which is 225 Liter. I assume everyone has at least 7 extra jeans, 12 extra shirts, and 1 extra sock.

  1. Fill out the 3rd column of the following table based on the first two columns using element by element operation.
  2. Find the total amount of water (in liter) used in column 3 using the sum() function.
  3. 2800 Liter of water is needed for an avocado tree per year, how many avocado trees could you water with what you found in b
  4. I did the math (using how much water avocado and lemon and tomato needs) and discovered that for 1500 liter of water you can make 1 m3 of Guacamole. What percentage of your room can be filled with Guacamole using what you found in b. ( The usual size of a room is 5x6x3 meters which leads to 90 m3)Number of Extra Item Liter of water/unit Total water consumption per category 7 _(Jean) 11,000 12 _(Shirt) 2700 1 (Sock) 225
0 0
Add a comment Improve this question Transcribed image text
Answer #1

I have provided both the text and the screenshot for your better understanding. The screenshot also has some comments for your help. Please note that these are script files which are to be saved as "function_name.m" in your MATLAB root directory.

pilot.m

fan.m x pilot.mx + function pilot() 1 2 3 4 5 - 6 7 SUBPART A water = [11000;2700;225]; storing water amount in liters extra
function pilot()

%SUBPART A
water = [11000;2700;225]; %storing water amount in liters
extra = [7;12;1]; %storing item number
tot = zeros(3,1); %column 3 initialize
for i = 1:3
tot(i) = water(i) * extra(i);
end
disp('Column 3 entries');
disp(tot);

%SUBPART B
amt = sum(tot);
fprintf("Total water used is %d litres\n",amt);

%SUBPART C
tre = amt/2800;
fprintf("Number of avocado trees that can be planted is %d. \n",floor(tre));

%SUBPART D
vol = amt / 1500;
fprintf("Total volume of room that can be filled with Guacamole is %.2f %%\n",vol*100/90);
end

OUTPUT

>> pilot Column 3 entries 77000 32400 225 Total water used is 109625 litres Number of avocado trees that can be planted is 39

*A humble request* - If you have any doubt, please use the comment section to communicate. Please be a little patient, it is an honest promise I will reply as soon as possible. This will clarify your doubt, and also help me to get better at answering your next questions. At the same time, If my answer helped you, please consider leaving an upvote. I hope you understand my viewpoint. Thank you :)

Add a comment
Know the answer?
Add Answer to:
in matlab It takes approximately 11,000 liters (3,000 gallons) [BBC] to make a pair of jeans....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Matlab Questions (please show what code I need, including any comments, for each of the questions):...

    Matlab Questions (please show what code I need, including any comments, for each of the questions): 1)  Initialize two row vectors a and b of arbitrary but equal lengths (pick any length ³3) with random numbers between 0 and 1. Recalling that the dot product between two vectors is a ∙ b = |a||b| cos theta, calculate the angle, theta, between the two vectors (radians or degrees is fine, just state what you used). Note: • You can use built-in inverse...

  • Read about Cokes strategy in Africa in the article below and discuss the ethics of selling...

    Read about Cokes strategy in Africa in the article below and discuss the ethics of selling soft drinks to very poor people. Is this an issue that a company like Coke should consider? Africa: Coke's Last Frontier Sales are flat in developed countries. For Coke to keep growing, Africa is it By Duane Stanford Piles of trash are burning outside the Mamakamau Shop in Uthiru, a suburb of Nairobi, Kenya. Sewage trickles by in an open trench. Across the street,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT