How can I save internal variable to a vector with ode45.
2 ビュー (過去 30 日間)
古いコメントを表示
function [dx]= system(t,x)
global m I
F= expression;
u=F+alpha*u(t-1);
dx(1)=x(2);
dx(2)=m*x(1)+u/I;
dx(3)=-m*x(1)-u/I;
dx=[dx(1);dx(2);dx(3)]';
end
[time,Xs]=ode45(@system(t,x),[0:0.1: 7],x01)
x01=[0.05 0.05 0 ]'
I want to save u , and use it to have u(t-1)
2 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!