how to plot eigenvector calculated from eigs from the matrices created by freefem++
조회 수: 6 (최근 30일)
이전 댓글 표시
How to plot the eigenvector calculated from eigs from the matrices created by freefem++?
댓글 수: 0
답변 (1개)
William Rose
2024년 2월 12일
quiver() is good for 2-D vectors; quiver3() for 3D.
For an example, I will use the magic square matrix, but I could use some opther random 2x2 matrix.
[v,d]=eigs(magic(2))
Plot the eigenvectors, with their bases at the origin:
quiver([0,0],[0,0],v(1,:),v(2,:));
axis equal; grid on
I use 'axis equal' to get a plot with equal scale factors on the x and y axes. If you don't do this, then vectors that are at right angles may look like they're not, etc.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!