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.

 採用された回答

Walter Roberson
Walter Roberson 2017 年 6 月 30 日
編集済み: Walter Roberson 2017 年 6 月 30 日

1 投票

syms a positive
if isAlways(a>0); disp('OK'); else disp('KO'); end

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by