Question

1) (2 pts) Write a script to plot the function 15V4r +10 r29 10 r<0 for-5ss 30
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE

clc
clear all
x=-5;
i=1;
while x<=30
  
if x<0
y(i)=10;
elseif x>=0 && x<9
y(i)=10*x+10;
elseif x>=9
y(i)=15*sqrt(4*x)+10;
end
i=i+1;
x=x+.5;
end
x=-5:.5:30;
plot(x,y)
xlabel('x')
ylabel('y')
grid on

OUTPUT

180 16아 140ト.. 12아 . 100 60 15 2 25 30 5 5 0

Add a comment
Know the answer?
Add Answer to:
1) (2 pts) Write a script to plot the function 15V4r +10 r29 10 r<0 for-5ss...
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