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