필터 지우기
필터 지우기

Eigenvalues and eigenvectors of 4 systems of ODe

조회 수: 5 (최근 30일)
Sunday Aloke
Sunday Aloke 2023년 12월 2일
댓글: Walter Roberson 2023년 12월 9일
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에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품


릴리스

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by