Create array with same number
170 ビュー (過去 30 日間)
古いコメントを表示
I have this command z=ones(length(x),1) If I want to change (ones) with 2 or 3 what I should do?
0 件のコメント
採用された回答
James Tursa
2018 年 9 月 14 日
編集済み: James Tursa
2018 年 9 月 14 日
See this link for a discussion of various methods to do this:
The fastest method seems to be
z = zeros(length(x),1) + 2;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!