I want to find the rotation matrix between two vectors.
[0;0;1] = R * [0.0023;0.0019;0.9899]
How do I find the 3*3 rotation matrix?
Your problem can be defined as a linear equation, say,
y = mx
where, y and x are matrices. Find m.
Solution:
m = x\y or m = mldivide(x,y)
Notice the backslash. It is not a forward slash / as Wolfie mentioned in his answer. For details see https://www.mathworks.com/help/matlab/ref/mldivide.html
Additional Details:
If x is a singular matrix, use pinv. See https://www.mathworks.com/help/matlab/ref/pinv.html for reference.
lengthof a vector is the number of elements. Note also that the example given by the OP could be subject to rounding (1 is pretty close to 0.98), so it would be more useful to note something like "be aware that the magnitude of the vectors is different, if this isn't due to rounding then the rotation matrix is ill-defined". - Wolfie