what is wrong with my matrix?

AA=[1 0 1 0 0 0 0 0 0; 0 1 0 1 0 0 0 0 0; 0 0 -R*sind(theta) R*cosd(theta) 0 0 0 0 0; 0 0 0 0 1 0 1 0 0; 0 0 0 0 0 1 0 1 0; 0 0 -1 0 -1 0 0 0 0; 0 0 -c 3*R -c -3*R 0 0 0; 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0]
%
CC=[0 Md*g Id*alpha 0 Md*g Id*alpha Mp*ax Mp*ay+Mp*g Mb*g]
%
xx=CC/inv(AA)
%
Warning: Matrix is singular to working precision.
> In DynamicsProject (line 57)
> In DynamicsProject (line 57)
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.

4 Kommentare

John D'Errico
John D'Errico am 16 Jun. 2016
You asked exactly this question before. I answered it then. What was wrong with that answer?
Roger Stafford
Roger Stafford am 16 Jun. 2016
As your error message states, your matrix AA is singular - that is, its determinant is zero. You can easily see that because the bottom two lines are all zeros. For that reason it possesses no inverse, and your line “xx=CC/inv(AA)” cannot be performed.
I am not sure you meant to write CC/inv(AA) instead of CC/AA, in which case you are faced with an intractable problem. However, if you really meant that, then CC/inv(AA) can be regarded as equivalent to CC*AA, and that you can compute. You need to decide whether you really meant CC/inv(AA) or not. (I suspect you didn’t.)
Emily Gobreski
Emily Gobreski am 16 Jun. 2016
Bearbeitet: Emily Gobreski am 16 Jun. 2016
Thank you Roger. I appreciate your answer. I am very new to MATLAB and I clearly have no idea what I'm doing. Again, I really appreciate your help.
Walter Roberson
Walter Roberson am 18 Jun. 2016
Emily Gobreski comments to John:
I'm sorry you feel this way. I have this huge project due using MATLAB software, and I'm a first time MATLAB user. I do not wish for anyone to do the project for me. I just have no clue what I am doing.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 16 Jun. 2016

Bearbeitet:

am 19 Jun. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by