Please please help fix my error!
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
RH2 = 5980;
theta1H2 = 8.314/(2*1.0079)*1000;
T = 0.1:1:6000;
cvH2 = (3+2)*.5*RH2 + ((theta1H2./(2*T)).^2)/(((sinh(theta1H2./2*T))).^2)*RH2;
I receive the warning message:
'Warning: Rank deficient, rank = 0, tol = NaN.'
This shows up almost 100 times during my code (same formula)
댓글 수: 0
답변 (1개)
Roger Stafford
2015년 2월 6일
In the equation for 'cvH2' you are doing a matrix right divide when you use "/" without the dot. You are doing a matrix division of one long row vector by another row vector of the same length. This is the source of your trouble. The quantity to the right of the division sign becomes infinite over the range of T because of the nature of the 'sinh' function, since its argument, "theta1H2./2*T", becomes so large. Read the documentation for 'mrdivide' at
http://www.mathworks.com/help/matlab/ref/mrdivide.html
which states, "MATLAB® displays a warning message if A is badly scaled or nearly singular, but performs the calculation regardless." In your case it is certainly badly scaled.
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!