Multi dimensional vector operation

1 view (last 30 days)
MarshallSc on 14 Nov 2021
Commented: Matt J on 15 Nov 2021
I have two sets of matrices, for example:
r_x=rand(3,3);r_y=rand(3,3);r_z=rand(3,3);
h_x=rand(3,3);h_y=rand(3,3);h_z=rand(3,3);
That is shown as, for x for example:
What I want to do is to take each component of the matrices in the 3 dimensions and form a column vector such that, for example for component (1,1):
r_11=[r_x(1,1);r_y(1,1);r_z(1,1)]; h_11=[h_x(1,1);h_y(1,1);h_z(1,1)]
And solve three sets of simultaneous equations:
Which essentially do this calculation:
I want to solve for the L matrix (r and h are known). I'd appreciate it if someone can please help me. Thank you.
MarshallSc on 15 Nov 2021
Yes, they are quadratic. My actual values are in complex conjugate format so it is not a problem if they're not real values.

Matt J on 14 Nov 2021
Edited: Matt J on 14 Nov 2021
L_squared=([hx(:),hy(:),hz(:)]\[rx(:),ry(:),rz(:)]).';
Matt J on 15 Nov 2021
For each component of H or R in 3D, I need to have the 3*3 matrix for each point.
You can't derive a 3x3 matrix L from two 3x1 vectors. That gives you only 3 equations for 9 unknowns.

Categories

Find more on Solver Outputs and Iterative Display in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by