x greater than y by some value
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi!
I have a problem with the syntax, I want to write an if loop that: if x is greater than y by 10 then .. I only know how to write that x is greater than y and the action, but how to write that is 10 greater?
The solution is probably easy but I have no idea ..
Thank you for your help!
댓글 수: 0
채택된 답변
Cameron B
2020년 1월 18일
if x - y > 10
disp(’greater than 10’)
else
disp(‘less than or equal to 10’)
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!