Why does my rocket velocity simulation flatten out instead of accelerating?

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 3K views
aaaa202
Messages
1,144
Reaction score
2
Did a question about this a few weeks ago, but I thought I might do another, as I don't quite get, what is going on.
The relationship:
v=vex * log(m0/m(t))
tells us that a rocket will attain greater and greater acceleration as time goes. However, when I try to simulate this in Matlab I get the curve attached (time versus velocity). Anyone got an idea, what could be wrong? It looks similar to that of a ln-curve, but shouldn't it look differently. If someone is into Matlab programming, can they please look at what I've failed in my (short!) script (attached).
 

Attachments

  • Unavngivet.png
    Unavngivet.png
    2.3 KB · Views: 549
  • raketprojekt.m
    raketprojekt.m
    391 bytes · Views: 483
Physics news on Phys.org
aaaa202: Typically the independent variable (time in this case) is on the horizontal axis and the dependent variable (velocity in this case) is on the vertical axis. You are plotting time on the vertical axis, velocity on the horizontal.

Switch the arguments to the plot function and all will be well.
 
OMG! I can't believe that solved it! Thank you so much!