what is wrong with my matrix?
Mostra commenti meno recenti
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 Commenti
John D'Errico
il 16 Giu 2016
You asked exactly this question before. I answered it then. What was wrong with that answer?
Roger Stafford
il 16 Giu 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
il 16 Giu 2016
Modificato: Emily Gobreski
il 16 Giu 2016
Walter Roberson
il 18 Giu 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.
Risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!