Question

Matlab Help

How to go over this integration by using loop of matlab programming,

Given A 2, a 0.5, c 0.6, g 9.8 h1- 2, h1- 1, t1-0, t2 0 dh Q A EQ(2) dt Substitute EQ(1) to EQ (2) dh dt h2 t2 dh t 1

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

Answer: The given equation can be integrated by interchanging the upper and lower limits and putting a minus simple before th

Copyable code:

%define the equation

funch=@(h) 2/(0.5*0.6*sqrt(2*9.8*h));

%no of points

N=100;

%define upper and lower limits

hlower=1;

hupper=2;

%delta value

in=(hupper-hlower)/N;

%find value for lower h

ValQ=(-1)*funch(hlower);

%loop

for kk=1:N-1

ValQ=ValQ + 2*(-1)*funch(hlower+kk*in);

end

%find value at upper value

ValQ=ValQ+(-1)*funch(hupper);

%display the value

ValQ = 0.5*in*ValQ

Add a comment
Know the answer?
Add Answer to:
Matlab Help How to go over this integration by using loop of matlab programming, Given A...
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
ADVERTISEMENT