Running an if function
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I want to run an If function. So if x<3 then I want function "Runningwater" to be executed. How can I implement this as code?
thanks guys
댓글 수: 0
채택된 답변
Geoff Hayes
2015년 1월 21일
if x < 3
Running water;
end
댓글 수: 2
Geoff Hayes
2015년 1월 21일
The double ampersand is used for and, and the double pipe for or. For the and, you would do
if x<3 && y>4
Runningwater;
end
For the or, you would do
if x<3 || y>4
Runningwater;
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dynamic System Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!