I am trying to create a table using the while loop function. The error I get is: "Index in position 1 is invalid. Array indices must be positive integers or logical values."
Here is my code:
v0 = 100;theta = 25;t = 0.1;while t <= 1.0 vx=cos(theta*pi/180)* v0 * t; vy=sin(theta*pi/180)* v0 * t; table(t*10,1) = t table(t*10,2) = vx table(t*10,3) = vy t = t + 0.1end
Best Answer