How to find if a symbolic operation contains a or function?

조회 수: 1 (최근 30일)
gonzalo Mier
gonzalo Mier 2020년 11월 17일
댓글: gonzalo Mier 2020년 11월 19일
I'm trying to find if a symbolic equation has the 'or' function or not.
I have tried to do this:
syms a b
has(a|b,'or') % logical 0
has(or(a,b),'or') % logical 0
I don't know if this is a bug. Do you know other ways to do this?
Thank you
  댓글 수: 2
gonzalo Mier
gonzalo Mier 2020년 11월 17일
For now, I am doing this:
f = a|b;
contains(char(f),'|');
If anyone has a better way, please share.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 18일
hasSymType(a|b, 'or')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by