필터 지우기
필터 지우기

matlb solution dX/dt=AX(t)+B

조회 수: 12 (최근 30일)
SAFA BOUDHRAA
SAFA BOUDHRAA 2018년 1월 13일
편집: SAFA BOUDHRAA 2018년 1월 14일
morning, help me please, i am working i=on the resolution of the equation :dX/dt=AX(t)+B i have used ode45 but it gives wrong results . any suggests please thank you so much

채택된 답변

Star Strider
Star Strider 2018년 1월 13일
We need to see your code to determine what the problem is. The ODE solvers such as ode45, and for ‘stiff’ systems ode15s, should be able to solve it for linear or nonlinear ‘A’ matrices.
One way to solve it, if ‘A’ is a square, linear time-invariant (‘LTI’) matrix, is to use the matrix exponential expm (link) function.
Then:
x(t) = expm(A*t)*B
You will need to loop through values of ‘t’ to provide a matrix of solutions.
The Control System Toolbox also has several functions that will work.

추가 답변 (1개)

SAFA BOUDHRAA
SAFA BOUDHRAA 2018년 1월 14일
편집: SAFA BOUDHRAA 2018년 1월 14일
function DY=resolution(t,y) A=[2*t 1 -3 sqrt(3) ;cos(t) 0 sqrt(2) -3 ;0 t -2 1; 4 sin(t) 0 t]; B=[0.5*t;1;0;0] dX=A*X+B ; end Q=zeros(4,1); Q(1,1)=12; [T,e] = ode45(@resolution,[0 2],Q); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by