I entered an instruction to calculate the coordinates of a vector after a change of basis in order to repeat it many times with various vectors.
X0=[1;1/2] is a set of coordinates in the initial basis and
P=[-4,2;1,1] is the new basis expressed in the initial one.
When I compute
P^(-1)*X0 I get :
ans = [-2.776D-17 ; 0.5]
The problem is, when I work it out by hand, I get
P^(-1)=[-1/6,1/3;1/6,2/3] which Scilab agrees with, and then the first coordinate of
P^(-1)*X0 should be
So I attempted to calculate that first coordinate manually with Scilab, by entering
(-1/6)*1+(1/3)*(1/2) which indeed gave me
0 as an answer.
I tried restarting Scilab which didn't resolve the issue, and I'm not a computer expert, anyone seen this happen before?