"Conversion to logical from sym is not possible." error shows up when I try to execute the following comands
Show older comments
X=.25;U=1;
>> eps1=.05;eps2=.05;
>> k=1;
>> while (abs(C-gamma))>=eps1
X=X-inv(Cx)*(C-gamma);
if abs(C-gamma)<eps1
if abs(Lbar_u)<eps2
break;
else
k=k+1;
U=U-K*(Lbar_u);
end
end
end
Conversion to logical from sym is not possible.
I ALSO TRIED TO USE A ALTERNATE WHILE LOOP CONDITION:
while double(subs(abs(C-gamma))) > double(eps1)
BUT THE ERROR PERSISTS
how can i fix it?
2 Comments
Walter Roberson
on 29 Mar 2013
Where does the error show up? Which variables are symbols? What is the value of C and gamma and Cx and Lbar_u ?
This appears to be very similar to your previous question, which I do not think is resolved as yet. Are you sure it is not a duplicate ?
upinderjeet
on 30 Mar 2013
Edited: Walter Roberson
on 30 Mar 2013
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!