I need to add my equation (60+(2.13*(t^2))-(0.0013*(t^4))+(0.000034*(t^4.751))) to a function but I cant figure it out. What I've tried just comes out as an error. Please help.
k=1;for t = 0:2:100; h(k) = (60+(2.13*(t^2))-(0.0013*(t^4))+(0.000034*(t^4.751))); k = k+1; if h>=0 disp(h); end end
This is what I tried but it doesnt work.
k=1;for t = 0:2:100; h(k) = rocket(t) k = k+1; if h>=0 disp(h); end endfunction h(k) = rocket(t) h(k) = (60+(2.13*(t^2))-(0.0013*(t^4))+(0.000034*(t^4.751)));end
Best Answer