Conversion to logical from sym is not possible. wanna do inequalities to syms
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
I am trying to solve inequalites and then apply condition as the attachment:
![Screen Shot 2019-08-25 at 03.41.27.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235223/Screen%20Shot%202019-08-25%20at%2003.41.27.png)
![Screen Shot 2019-08-25 at 03.41.37.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235224/Screen%20Shot%202019-08-25%20at%2003.41.37.png)
![Screen Shot 2019-08-25 at 03.41.40.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235225/Screen%20Shot%202019-08-25%20at%2003.41.40.png)
I understand I can not set condition to symbolic variables, but I just need to know if will fit the condition or not, so please any suggestions!
clear all;
clc;
syms x y real ;
yin2=[solve(-1>x+y,y), solve(x+y>20,y)];
% @ x=10
if -12>y && y>11
display('DONE')
else
display('again')
end
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!