Hi, I have two vectors, u = (u1, u2, u3) and the vector v = (v1, v2, v3) with the lenght of 1. The two vectors are orthagonal to each other and the first coordinate is 0. I am trying to figure out how to write this in matlab. I have tried the following:
u=input('Please enter a vector u=[u1 u2 u3]: '); v1 = [0 u(2) u(3)];v1 = v1 / norm(v1);u = cross(u,v);disp(' '); % Vectors are calculated
v1=1*u;v2=2*u;v3=3*u;v4=4*u;
But it does not seem to be working so I guess some variable/variables are not correct. Can you see what is wrong?
Best Answer