how to use this symbol in matlab?? ±

조회 수: 1 (최근 30일)
B.k Sumedha
B.k Sumedha 2015년 6월 2일
댓글: James Tursa 2015년 6월 2일
I have a if loop where i need to check the condition.The loop is something like this:
if(tht(1)==thf(1))
S='Orginal Note';
disp(S);
else
S = 'Fake Note';
disp(S);
end
Inside that if loop i want to place that ±. How can i do this?? For example like:
if(tht(10)==thf(10±5))
How it can be done??

채택된 답변

James Tursa
James Tursa 2015년 6월 2일
Did you mean a simple test for two different values?
if( tht(10)==thf(10-5) || tht(10)==thf(10+5) )
  댓글 수: 2
B.k Sumedha
B.k Sumedha 2015년 6월 2일
Cant it be used in just one situation both together.
James Tursa
James Tursa 2015년 6월 2일
If you are asking if ± is an allowed operator in MATLAB, the answer is no.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by