How can I input this data into a table without overwriting it?
Show older comments
for i = 0:1:steps
% Creates a loop to calculate the variables as time progresses
time = time + dt;
fprintf('Step number %i Time equals %fseconds\n',i,time);
% calculates time and logs the data in a spreadheet
theta = theta + omega*dt;
fprintf('Step number %i theta equals %fradians\n',i,theta);
% calculates theta and logs the data in a spreadheet
omega = omega - sin(theta).*(g/L).*time;
fprintf('Step number %i omega equals %fradians per second\n',i,omega);
% calculates omega and logs the data in a spreadheet
T = table(time,theta,omega,'VariableNames',{'time','theta','omega'});
end
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!