symbolic variable - proving positive

2 Ansichten (letzte 30 Tage)
Gennaro Arguzzi
Gennaro Arguzzi am 30 Jun. 2017
Bearbeitet: Walter Roberson am 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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Jun. 2017
Bearbeitet: Walter Roberson am 30 Jun. 2017
syms a positive
if isAlways(a>0); disp('OK'); else disp('KO'); end

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by