How to create matrix array using while loop and time increment?
34 views (last 30 days)
I have a problem where i want to solve a problem where an apple falls from a tree from 3m before hitting the ground. Assuming there is no air resistance, how long will it take to hit the ground? I have to create an array with time increments until the distance becomes 0 at the final time. So first column should show my time and second column will show the distance going down at every increment.
t = 0;
a = zeros(,2);
a(i,:) = [t,y1]
0.0065 2.0726 %sample results
But when I run my code, it won't stop running and instead of 0.10 increments, the time looks off. How do I use the while loop (must use) to find the time it takes for the final y value to be 0.