採用された回答

Geoff Hayes
Geoff Hayes 2020 年 3 月 24 日

0 投票

Amit - a is a row array but the code in the loop is treating it like a column array. Try changing the code to
for i = 1:5
c(i,:) = a(i)+5
end
You should decide whether c should be a row or column array.

1 件のコメント

Amit Kumar
Amit Kumar 2020 年 3 月 24 日
Thnak you so much..

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2020 年 3 月 24 日

コメント済み:

2020 年 3 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by