Differential equations on MATLAB

조회 수: 4 (최근 30일)
Lina Baquero
Lina Baquero 2012년 11월 28일
I have this exercise but I'm stock:
A =[5 1 0 0; 1 5 0 0; 0 0 1 -2; 0 0 2 1]
a)solve dx/dt = Ax using the differential equation solving commands of MATLAB b) calculate e^(At) c) put the four LI solutions in a 4 x 4 matrix of functions X and solve e^(At)B=X for B
I know if it possible to find the eigenvectors and eigenvalues and the solve for c (the coefficients) but I don;t know if this would be using the differenctial equation solving commands of MATLAB.

답변 (2개)

Ryan G
Ryan G 2012년 11월 28일
I believe ODE45 may be what you're looking for. Have a look at that documentation, give it a shot and then if you get stuck you can ask a new question.
I will give you 1 hint, you want to breakup the matrix into a system of equations:
x1' = 5*x1 + x2
x2' = x1 + 5x2'
etc
and then format it so it works for the solver in MATLAB.

Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 28일
function dx=my_eq1(t,x)
dx=zeros(4,1);
A =[5 1 0 0; 1 5 0 0; 0 0 1 -2; 0 0 2 1]
dx=A*x
%call your function
xinitial=[1 1 -1 2];
[t,y]=ode45(@my_eq1, [0 10],xinitial)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by