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

John D'Errico
John D'Errico 2016년 6월 16일
You asked exactly this question before. I answered it then. What was wrong with that answer?
Roger Stafford
Roger Stafford 2016년 6월 16일
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 2016년 6월 16일
편집: Emily Gobreski 2016년 6월 16일
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 2016년 6월 18일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2016년 6월 16일

편집:

2016년 6월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by