Assigning count values to the column of a matrix
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have a matrix A with the size 29x3 and I want to fill third column with the numbers from 29(the max lenght) to 1.
Is there a possible way to do it without using loops?
Regards
0 件のコメント
採用された回答
Stephen23
2019 年 1 月 27 日
Either one of these, depending on the order that you want:
A(:,3) = 1:29
A(:,3) = 29:-1:1
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!