How does MATLAB arrange the complex values in the vector obtained from mldivision?

Dear all, I have met the following problem: When I use X= A \ B, in sense of 4 algebraic complex equations with 4 unknowns, I of course obtain the result vector X =
[X1=-4.2192e-010 -2.3992e-010i; X2= 6.9197e-011 -4.0727e-010i; X3=0.044132 - 0.052999i; X4=0.061293 + 0.052999i].
Unfortunately, an error in the final results occured and after some hand calculation I have found that the order of the X’s values does not correspond to the order of the equations. Do you know how MatLab arranges the values in the vector X, obtained from the system of eq’s A*X=B? Thank you in advance for the valuable help! Regards

2 Comments

Could you please provide you A and B matrices,please? I would like to perform the calculation myself and see where is the error. Thanks
Dear David, thank you for the attention. When I sad error it final results, I have not meant the results from X=A\B. Let me explain:
I have the complex roots λj of one characteristic equation: -0.19028 - 0.18928i, 0.19028 - 0.18928i, 0.18826 + 0.18928i, -0.18826 + 0.18928i. After satisfying the boundary conditions I obtained the system of 4 algebraic complex equations with respect to uknown integration constant Cn, n =1,2,3,4, but the results of C=A\B are not arrange in the correct order. The correct should be:
Ccorrect: C1=0.044132 - 0.052999i, C2=-4.2192e-010 -2.3992e-010i, C3=6.9197e-011 -4.0727e-010i, C4=0.061293 + 0.052999i.
but via MatLab they are:
C1=-4.2192e-010 -2.3992e-010i,C2=6.9197e-011 -4.0727e-010i,C3=0.044132 - 0.052999i, C4= 0.061293 + 0.052999i. where: A=[ 0.18928 - 0.19028i, 0.18928 + 0.19028i, -0.18928 + 0.18826, -0.18928 - 0.18826i; 1,1, 1,1; 1.6342e+008 -2.9442e+007i, 1.6342e+008 +2.9442e+007i, 6.0207e-009 -1.4391e-010i, 6.0207e-009 +1.4391e-010i; 2.5329e+007 -3.6667e+007i, 2.5329e+007 +3.6667e+007i, -1.1125e-009 +1.1607e-009i, -1.1125e-009 -1.1607e-009i] B=[ 0 - 0.0032307i;0.10543; -0.052713 - 0.091301i; -0.0027978 + 0.0016153i]. Thanks

Answers (0)

This question is closed.

Products

Tags

Asked:

on 17 May 2013

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!