I have a function, for example speed as following:
v= v0 + a.*(t-t0);If I have the input variables v0, a and t0 but t is unknown and I know that for this specific step the process will continue until v=-20 m/s. How can I make matlab plot the whole process with small time steps (dt) until the speed is -20 m/s?
I'm thinking about using a while function such as:
while v>=-20v0=46;t0=2;a=-9.81;v= v0+a*(t-t0);endIt would be great if anyone could help me with that cause I am having real hard trouble to find how this should be done and trial and error does not seem to be the best solution!