help with plz
이전 댓글 표시
% Note :- in this code y & x has 10 values, but every time I run % the command it will give me this error... %*(??? Operands to the and && operators must be convertible to logical scalar values.)*
Error in ==> dewpointT at 75 if (abs(raw(1)) < 1e-5 && abs((y./K)-x) < 1e-5)
raw(1)= sum(y./K)-1;
if (abs(raw(1)) < 1e-5 && abs((y./K)-x) < 1e-5)
break
댓글 수: 1
Jan
2012년 3월 4일
Please use a meaningful subject line and tags.
채택된 답변
추가 답변 (1개)
Jan
2012년 3월 4일
0 개 추천
The error message is very clear: "Operands to and && operators must be convertible to logical scalar values." It is always worth to read the error messages of Matlab.
댓글 수: 2
Nasir Qazi
2012년 3월 5일
Walter Roberson
2012년 3월 5일
Nasir, it doesn't bomb out with an error if you change to &, but that doesn't mean that it works. Please review Titus's response and study the documentation for "any" and "all"
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!