I'm trying to get this to work but im sure im just missing something fundamental. Here is my code:
function ht=find_ht(t) if t>=0; ht=-9.8/2*(t^2)+125*t+500; else ht='error'; end plot(t,ht) ax.XLim = [0 30] ax.XTick= [0:0.5:30]
errorplots
function ht=find_ht(t) if t>=0; ht=-9.8/2*(t^2)+125*t+500; else ht='error'; end plot(t,ht) ax.XLim = [0 30] ax.XTick= [0:0.5:30]
Best Answer