フィルターのクリア

Different dimension matrix addition

2 ビュー (過去 30 日間)
Nir Vaishnav
Nir Vaishnav 2022 年 7 月 18 日
コメント済み: Nir Vaishnav 2022 年 7 月 18 日
I have a 2×2 matrix and i want to add it to a 4×4 matrix. How shall i proceed to do this?
  2 件のコメント
KSSV
KSSV 2022 年 7 月 18 日
How you would like to add? How can you add them?
Nir Vaishnav
Nir Vaishnav 2022 年 7 月 18 日
i want it in the form of 4x2 matrix.

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

採用された回答

KSSV
KSSV 2022 年 7 月 18 日
Is this what you want?
A = rand(2) ;
B = rand(4) ;
iwant = repmat(A,2,2)+B
iwant = 4×4
0.2803 0.8238 0.4495 1.2927 1.3378 0.3492 1.1742 1.1508 0.9659 1.5570 0.9271 1.4413 1.0116 1.0375 1.2757 0.6122

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by