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!