symbolic variable - proving positive
3 views (last 30 days)
Show older comments
Gennaro Arguzzi
on 30 Jun 2017
Edited: Walter Roberson
on 30 Jun 2017
Hi everyone. How can I prove that a symbolic variable is positive? It is not possible to use if statement for symbolic variables.
close all
clear all
a=sym('a','positive');
if(a>0)
disp('OK')
else
disp('KO')
end
Thank you.
0 Comments
Accepted Answer
Walter Roberson
on 30 Jun 2017
Edited: Walter Roberson
on 30 Jun 2017
syms a positive
if isAlways(a>0); disp('OK'); else disp('KO'); end
0 Comments
More Answers (0)
See Also
Categories
Find more on Assumptions 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!