How to assign the values to a matrix?
19 ビュー (過去 30 日間)
古いコメントを表示
Dear All,
I have a zero matrix A whcih needs to be assigned values from an column vector B. The indecies of those elements are stored in a two-columns array C.
For example, B = [1 9 12 31], C = [1 4;3 6;5 2;6 3]. Then matrix A is =[0 0 0 1 0 0; 0 0 0 0 0 0; 0 0 0 0 0 9;0 0 0 0 0 0; 0 12 0 0 0 0;0 0 31 0 0 0].
Thanks a lot.
Benson
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Audio and Video Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!