How to I combine matrix?

2 ビュー (過去 30 日間)
file123
file123 2018 年 3 月 8 日
コメント済み: file123 2018 年 3 月 8 日
Hey there, i just started to work on matrices in matlab and i had a problem with that. Problem is
fet is a function. it takes 1 and 2 variables in for loop. When fet() take 1 it make it 1x10 sized matrices. When fet() takes 2 it make it 1x10 sized matrices also.
I want to make variable named "write" is equal to 1x20 sized matrices after for loop.
for i=1:2
write=fet(i)
end

採用された回答

Birdman
Birdman 2018 年 3 月 8 日
Instead, do it in the loop while you can.
for i=1:2
write(i,:)=fet(i)
end
  8 件のコメント
Birdman
Birdman 2018 年 3 月 8 日
No, of course clean up your variable before you do it and then run the code.
file123
file123 2018 年 3 月 8 日
Okey i understand ,thank you very much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by