Question

2. (a) An object thrown vertically with a speed vo reaches a height h at time t, where: he vot tgt Write a MATLAB program wit
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

FUNCTION FILE

function t=fun(v0,h)
g=9.81;
    f=@(t) v0*t-0.5*g*t.^2-h;
    t=fzero(f,10);
end

Command needed to run

fun(50,100)

b)

clear all
clc
x=input('Enter x: ');
if(x<-1)
    y=exp(-x+1);
elseif(x<5)
    y=2*sin(pi*x);
else
    y=10*(x-5)+1;
end
fprintf('The value is %f\n',y);

MATLAB R2018a Search Documentation Log In HOME EDITOR Find Files Run Section Compare New Open Save Advance Run and Print Find

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
2. (a) An object thrown vertically with a speed vo reaches a height h at time...
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