How introduce a little matrix in a big matrix

1 回表示 (過去 30 日間)
Isabel Aldana Benavides
Isabel Aldana Benavides 2020 年 4 月 26 日
回答済み: Ameer Hamza 2020 年 4 月 26 日
Hello,
in this moment i have that problem:
I have a matrix of 2400 columns and 8 rows, and every column should go stored in a big matrix of 2400 columns and 546 rows, the little matrix have the position of the row in the should go stored in a big matrix, so, i need the big matrix with the little matrix stored.
Thanks!!
  1 件のコメント
Rik
Rik 2020 年 4 月 26 日
What have you tried so far?

サインインしてコメントする。

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 4 月 26 日
You can use indexing to place a small matrix inside a larger matrix. For example
M_large = rand(564, 2400);
M_small = rand(8, 2400);
first_row = 11; % suppose you want to start M_small at row number 11 in M_large
M_large(first_row:first_row+7, :) = M_small;

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by