symbolic eig, problems with presentation and zero values
조회 수: 1 (최근 30일)
이전 댓글 표시
Please look at the following example
if true
clear all
A= sym([1 1 1; 1 1 1; 1 1 1])
% the eigenvalues of that matrix are l1=0 (alg mult=2) l2=3 (alg mult=1)
% the following matrix contains eigen vectors (not the same base as matlab uses)
V2=[-1 -1 1;2 -1 1; -1 2 1]
% Check
Z=A*V2(:,1) % OK
Z=A*V2(:,2) % OK
Z=A*V2(:,3) % OK
B=inv(V2)*A*V2
z=B(1,3)
ps2=vpa(z,3)
so the value of B(1,3) should be zero, but since I have chosen symbolic variables matlab returns
z=-18014398509481983/649037107316853453566312041152512
z=-2.78e-17
that is a bit annoying, how can it be avoided?
Uwe Brauer
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!