symbolic eig, problems with presentation and zero values
Afficher commentaires plus anciens
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
Réponses (0)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!