Help on eigenvector plot
1 回表示 (過去 30 日間)
古いコメントを表示
Hello forum,
I am trying to plot the eigenvector of my dataset. This is my code
X = 0:0.01:1; Y = 5*X+randn(size(X)); Z = 0:0.005:0.5;
A = cat(1,X,Y,Z);
c = A*A.';
[vec,val] = eig(c);
plot3(A(1,:),A(2,:),A(3,:),'ro'); hold on
%sc_vec = vec*val;
z = zeros(1,3); plot3([z;vec(1,:)],[z;vec(2,:)],[z;vec(3,:)],'k')
axis equal grid on
If I were to use the scaled vectors, it would look like the figure below.
Can anyone help me on this ?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!