pendulum(m,k,T,dt)

版本 1.0.0.0 (1.6 KB) 作者: juhisteri
Simulation of a mathematical pendulum
112.0 次下载
更新时间 2017/12/3

查看许可证

This function creates a simulation of a mathematical pendulum:
a ball of mass m [kg] is attached to a string of length L [m];
the standard gravity g=9.81 m/s^2;
air resitance is equal to F=-kv^2, where constant k is set by the user;
pendulum oscillates the time period 0..T s;
time step is dt. The outputs are:

a=angle
p=generalized momentum = m*L^2*a'
p/L= real momentum
f=video

example:
[a,p,f]=pendulum(1,0.3,10,0.01);
See a video:
https://www.youtube.com/watch?v=lCPQEAE68TU

引用格式

juhisteri (2024). pendulum(m,k,T,dt) (https://www.mathworks.com/matlabcentral/fileexchange/65292-pendulum-m-k-t-dt), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2017b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Assembly 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0