Differential equations on MATLAB
조회 수: 6 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (2개)
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.
댓글 수: 0
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)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!