Eigenvalues and eigenvectors of 4 systems of ODe

4 次查看(过去 30 天)
clear all; clc format long %construct the matrix A. A=[0.00022 -0.0001 0 0; 0 0.1877 -0.1876 0; 0.32139 -0.32139 0.33212 -0.31817; -0.0000005 0 0 0.0001]; M=det(A); %Find the eigenvalues and eigenvectors of A by using eig. %This command gives AQ=QD. [Q,D] = eig(A); lambda1 = D(1,1); lambda2 = D(2,2); lambda3 = D(3,3); lambda4 = D(4,4); %Extract each colomn vector as an eigenvector of A. x_1 = Q(:,1); x_2 = Q(:,2); x_3 = Q(:,3); x_4 = Q(:,4);
%Display the result with long digits. format long; disp('lambda1 is '); disp(lambda1); disp('the eigenvector corresponding to lambda1 is'); disp(x_1); disp('lambda2 is '); disp(lambda2); disp('the eigenvector corresponding to lambda2 is'); disp(x_2); disp('lambda3 is '); disp(lambda3); disp('the eigenvector corresponding to lambda3 is'); disp(x_3); disp('lambda4 is '); disp(lambda4); disp('the eigenvector corresponding to lambda4 is'); disp(x_4); Please, what code do I use to
1. formulate matrix of the lambdas with their corresponding eigenvectors.
2. Find the determinant of the matrix to be formulated in 1.
3. Inverse of the matrix to be formulated in 1. @Walter Roberson. @Sam Chak
@Torsten @Star Strider
Please help me with the solutions
Thanks
  5 个评论
Sam Chak
Sam Chak 2023-12-4
I wonder how OP copied and pasted the MATLAB code, but it automatically removed the hidden 'newline characters', making the code unformatted. Could OP have pasted the MATLAB code as plain text? However I don't the "paste as plain text" feature in the browser.
Walter Roberson
Walter Roberson 2023-12-9
Users should click on the > button in the CODE section of the ribbon at the top of the editor area. Then they should copy and paste into the area that the > button created.
Pasting code into a > area typically automatically applies indentation. If you have pre-formatted code that you do not want the automatically-applied indentation to change, then immediately after pasting the code in, press control-Z (⌘-Z on Mac) and that will undo the automatic indentation without undoing the code insertion.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品


版本

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by