The question is to plot the function y=10(1-e^(=x/4)) over the interval 0<=x<=xmax. use a while loop to determine xmax such that y(xmax)=9.8.
I dont even know if my script is correct so i'll lay it down. I would like to see the correct script and if you may, describe the function of each line of the script, thank you.
>> x = (0:0.01:xmax);
xmax = 15.64809202;
while y(xmax) <= 9.8
y = 10*(1-exp(-x/4));
end
plot(x,y), xlabel('time (s)'), ylabel('Newtons')
??? Undefined function or variable 'xmax'.
I dont even know if my script is correct so i'll lay it down. I would like to see the correct script and if you may, describe the function of each line of the script, thank you.
>> x = (0:0.01:xmax);
xmax = 15.64809202;
while y(xmax) <= 9.8
y = 10*(1-exp(-x/4));
end
plot(x,y), xlabel('time (s)'), ylabel('Newtons')
??? Undefined function or variable 'xmax'.