フィルターのクリア

inverse loop

258 ビュー (過去 30 日間)
Arundhatee Talukdar
Arundhatee Talukdar 2011 年 11 月 22 日
コメント済み: Walter Roberson 2022 年 9 月 14 日
I want to use loop from i=180:1 and again next inserted loop j=180:1 Does matlab allow that? how I access (180,180) first rather then (0,0)...
  1 件のコメント
Amr
Amr 2016 年 10 月 12 日
sure ... use this command for i=180:-1:1 for j=180:-1:1

サインインしてコメントする。

回答 (4 件)

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 22 日
for i=180:-1:1
for j=180:-1:1
  1 件のコメント
Scott
Scott 2022 年 9 月 14 日
thanks

サインインしてコメントする。


Jan
Jan 2011 年 11 月 22 日
Whenever you have a problem with a specific command, be sure to read the help and doc text for this command:
help for
Step S with increments of -0.1
for S = 1.0: -0.1: 0.0, do_some_task(S), end

karan
karan 2011 年 11 月 22 日
編集済み: Walter Roberson 2022 年 9 月 14 日
do loop for i=180:-1:1
will have a decreasing step by 1
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 9 月 14 日
... but is not valid MATLAB syntax

サインインしてコメントする。


Thomas
Thomas 2011 年 11 月 22 日
Try,
for i=180:-1:1
for j =180:-1:1
i
j
end
end

カテゴリ

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