ball in a cone - Lagrange mechanics

animate the motion of a mass point constrained to move on the wall of a circle cone
ダウンロード: 82
更新 2018/7/11

ライセンスの表示

a point mass moves under the influence of gravity on the wall of a circle cone. Equations of motion for the two DOF's r and phi are obtained from the lagrangian L and solved numerically for a certain initial condition:

tspan = [0 T]; % time span for simulation
[r(t=0) r'(t=0) phi(t=0) phi'(t=0) ] initial conditions
y20 = [1.3 0 0 w ]; % w - angular frequency
f = @(l,y2) [y2(2); -g*cos(a) + y2(1)*(y2(4)^2)*((sin(a))^2)-k*(y2(2)^2+y2(4)^2)^0.5;y2(4);(-2*y2(2)*y2(4))/(y2(1))] ;

[l,y2]=ode45(f,tspan,y20); % call ode45 solver

the zip-file contains a mp4-video of the animation (created using matlabs WriteVideo() function)

引用

Lucas Tassilo Scharbrodt (2024). ball in a cone - Lagrange mechanics (https://www.mathworks.com/matlabcentral/fileexchange/68002-ball-in-a-cone-lagrange-mechanics), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2017b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersWaves についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0