how to use two while and for loops?

조회 수: 2 (최근 30일)
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2021년 3월 7일
hi to all:
i have two condition in my problem in matlab.
(1) matlab should run the first statement when x<1 .
(2) when x reaches to x>1 or x=1 the matlab should run the second statement.
thanks from all of you

답변 (1개)

KSSV
KSSV 2021년 3월 7일
if x < 1
statement1
elseif x >= 1
statement2
end
  댓글 수: 6
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2021년 3월 7일
i is the number of rows respected sir first i wan to do it for rows than for columns .
where i=1
it should follow the rule i+1 when m>=1.
thanks
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2021년 3월 7일
as you know in my programming the loop will stop when m reaches to 1 or greather 1, but i want it should go for i=2 and than i=3 and so on

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

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by