MATLAB : Eigenvalue and Eigenvectors of a Matrix (MATLAB coding)

preview_player
Показать описание
%MATLAB CODE for Eigenvector
clear all
clc
A(1,1)=5
A(1,2)=1
A(2,1)=1
A(2,2)=5

[V,D]=eig(A)

plot(V(:,1),'r--o', 'linewidth',2, 'markersize',10, 'markeredgecolor','r','markerfacecolor','r')
hold on
plot(V(:,2),'y--o', 'linewidth',2, 'markersize',10, 'markeredgecolor','y','markerfacecolor','y')

title('Eigenvectors of a Matrix', 'FontName','TimesNewRoman','fontweight','bold','fontangle',...
'italic','fontsize',16,'color','b')

% Similar for the case of Xlabel
xlabel('X Direction', 'FontName','TimesNewRoman','fontweight','bold','fontangle',...
'italic','fontsize',16,'color','k')

% Similar for the case of Ylabel
ylabel('Y Direction', 'FontName','TimesNewRoman','fontweight','bold','fontangle',...
'italic','fontsize',16,'color','k')
hold off
Рекомендации по теме
visit shbcf.ru