I am trying to develop a plot of four approximations and compare them to each other on the same plot using delta t = 4,2,1,0.5. I am just doing one for dt = 1 to write and then will add the others in once I got it working. When I run my code, I get an error when it goes to plot that says the length of (t) and the length of (Y) are not equal. I am really not sure how to fix it.
dt = [ 1 ]; tend = 10; t = 1:dt:tend; g = 9.8; Y(1) = 0; Vy(1) = 100; for i = 1:length(dt) for n = 1:length ((t)-1)