Question

2R R 1.25 IR 1.50 Id 1.20 1.75 1.74 1.25 3.76 1.75 Use decisional structures to write a function m-file to compute the tanks

0 0
Add a comment Improve this question Transcribed image text
Answer #1

function V = tank(R,d)


V = pi*R.^2.*(d-R) + (2/3)*pi*R.^3;

end

%save the above function and run the following script

V = zeros(1,length(d));
R = [1.5 1.25 1.75 1.25];
d = [1.2 1.75 1.74 3.76];
for i=1:length(d)
if d(i)<3*R(i)
V(i) = tank(R(i),d(i));
else
disp('overtop')
  
end
end

please rate

Add a comment
Know the answer?
Add Answer to:
2R R 1.25 IR 1.50 Id 1.20 1.75 1.74 1.25 3.76 1.75 Use decisional structures to...
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
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