Create an animated free body diagram?
31 views (last 30 days)
Show older comments
Is it possible to animate a free body diagram with a force changing over time? I already calculated an array with all the force values, but have no way of animating it in a good way besides plotting it like any other graph.
3 Comments
Answers (1)
Srivardhan Gadila
on 30 Oct 2020
The following is the example code based on the above functions:
1. If you want the point moving i.e., new point to appear and previous point to disappear:
figure
for i = 1:10
plot(i,abs(sqrt(100-i^2)),'o');
xlim([0 10])
ylim([0 10])
% hold on
pause(1)
end
% hold off
2. If you want all the previous points to appear in the plot as well:
figure
for i = 1:10
plot(i,abs(sqrt(100-i^2)),'o');
xlim([0 10])
ylim([0 10])
hold on
pause(1)
end
hold off
0 Comments
See Also
Categories
Find more on 2-D and 3-D Plots 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!