Info

この質問は閉じられています。 編集または回答するには再度開いてください。

what does this line mean

1 回表示 (過去 30 日間)
Matlab works
Matlab works 2020 年 2 月 26 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
t= [ones(1,10) 1+ones(1,10) 2+ones(1,15) 3+ones(1,10) ];
  1 件のコメント
Adam
Adam 2020 年 2 月 26 日

回答 (1 件)

Benjamin Großmann
Benjamin Großmann 2020 年 2 月 26 日
ones(r, c) creates an array of ones with r rows and c columns. That said, ones(1, c) creates a line vector with c elements. Here, four line vectors are created and written side by side in one line vector. Therefore, t is a line vector containing 10 ones, 10 twos, 15 threes and 10 fours.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by