Ask your own question, for FREE!
Mathematics 18 Online
OpenStudy (anonymous):

MATLAB help? ;/ im so lost You're driving to California, and start at a green light at a velocity of 0 mph. Every two seconds your velocity increases by 5 mph. You will reach a maximum velocity at t=60 seconds. a. Create an array for time and an array for velocity. b. Plot the velocity vs. time and label the axes.

OpenStudy (anonymous):

It says I have use some pseudo code first.. what's that mean?

OpenStudy (zarkon):

your velocity is off

OpenStudy (phi):

pseudo (false) code is just the main ideas written in "code" but without attention to syntax or specific function calls

OpenStudy (anonymous):

I have this document to help.. but I'm not sure which one to go off from to help me.

OpenStudy (zarkon):

5 will not work either

OpenStudy (anonymous):

6?

OpenStudy (zarkon):

5/2

OpenStudy (phi):

you should use the idea that Velocity= V0 (start velocity)+ A*t where A is the acceleration they tell you acceleration is 5 mph/ 2 sec

OpenStudy (anonymous):

I have to use a pseudo code first , but im not sure what or how to do that. Are pseudo codes the codes that are in the pdf I just uploaded ?^

OpenStudy (phi):

pseudo code is close to this Define acceleration a=5/2 make t an array of time t=0:60 let V (velocity) be 0 + a*t plot(t,V) label the axes

OpenStudy (phi):

Example A= 5/2; % acc in mph per second t= 0:60; % for 60 seconds V= A*t; % find the velocity as a function of time plot(t,V,'.'); xlabel('TIME (sec)'); ylabel('Velocity (mph)'); grid on; shg

OpenStudy (phi):

You could use example (2). I have a quibble with it, in that you should not use i as a variable name. i is pre-defined as sqrt(-1) and if you get into the habit of redefining i (which is what happens when you use it as a variable), someday with will make a mistake... but you could do this a= 5/2; n= 60; t= 0:n; v= zeros(size(t)); % create a vector v to hold the answer for ii=0:n v(ii+1)= a*t(ii+1); end; and then plot it

OpenStudy (anonymous):

okay, I'll try it out. THANK you so much :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!