Question: I need help with my MATLAB code. I am trying to calculate m in the code. I multiply ( u - b ) by A

I need help with my MATLAB code. I am trying to calculate m in the code. I multiply (u-b) by A to get m. The problem is that size of u-b is 3 by 1 and size of A is 3 by 3, so size of m should by 3 by 1 as well, but in my case I get a 3 by 3 matrix. Also I have to put a dot in the code here m =(u-b).*A; otherwise it shows an error. I don't know why it does that. can you help me fix the code
u =[5.0018696581196584,17.863820207570207,-13.086858974358975]';
% Hard iron offset (assume known or estimated)
b =[0.5,-0.3,0.1]'; % Example offset
B = mean(u);
R =(u-b)*B^2*(u-b)';
A = real(sqrtm(R));
m =(u-b).*A;
size(u-b)
size(A)
size(m)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!