Hi
I have a formular saying that: P_loss = P(transposed)*B*P + B0*P + B00
P = [P1 P2 P3] 1×3 vector, B is a 3×3 matrix, B0 = [-0.08 0 0.02]is a 1×3 vector, and B00 = 0.004is a constant.
How can i calculate this in matlab?
my code is:
P = [100 300 200]%B-matrices
B = [0.0003 0 0; 0 0.0002 0; 0 0 0.0005]B_0 = [-0.08 0 0.02] B_00 = 0.04;P_loss = P'*B*P+B0*P+B00
And i get this error:
??? Error using ==> mtimesInner matrix dimensions must agree.Error in ==> test at 10P_loss = P'*B*P+B0*P+B0
Best Answer