フィルターのクリア

How can i write three different condition in a single loop

2 ビュー (過去 30 日間)
Chaudhary P Patel
Chaudhary P Patel 2022 年 5 月 11 日
回答済み: Matt J 2022 年 5 月 11 日
I want to write three different condition in single loop. My three conditions are;
if i==1
if 1<i<N
if i==N

採用された回答

Matt J
Matt J 2022 年 5 月 11 日
for i=1:N
if i==1
elseif i<N
else %i==N
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by