Replacing arrays within a matrix
3 ビュー (過去 30 日間)
古いコメントを表示
Really quick question.
How do I replace in one command for instance, in a matrix of 4x4, the first two rows by a vector v, and the other two rows by a vector u?
0 件のコメント
回答 (1 件)
KSSV
2018 年 2 月 27 日
As you are replacing all the elements of the matrix..why you want to go for replace? You create a different matrix itself.....
u = rand(1,4) ;
v = rand(1,4) ;
iwant = [u ; u ;v ;v ]
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!