how to repeat looping the matrix

1 回表示 (過去 30 日間)
HASAN AL-KAF
HASAN AL-KAF 2017 年 8 月 23 日
コメント済み: KSSV 2017 年 8 月 23 日
Hi I have matrix 401*100 I want to make a code that can take the first row in matrix until reach to the end of row and start again from same matrix and take first row to the end of row and do this 451 times or until specific conditions . i want to use for adaptive linear neuron (adaline) for near infrared data

採用された回答

KSSV
KSSV 2017 年 8 月 23 日
A = rand(451,100) ;
[nx,ny] = size(A) ;
for i = 1:nx % loop for nx times
for j = 1:nx % loop to pick row
A(j,:)
end
end
But I am surprised....why?
  2 件のコメント
HASAN AL-KAF
HASAN AL-KAF 2017 年 8 月 23 日
thank you so much . sir what about if i have loop and every loop give me result and i want to sotre these result in matrix x . for example i want to store the result in loop one to row 1 matrix x and the result in loop 2 to row 2 in same matrix .
KSSV
KSSV 2017 年 8 月 23 日
You have already that stored in A...I am still surprised....why?

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

その他の回答 (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