Combination of diffrenet matrixes

1 回表示 (過去 30 日間)
Lee Cohen
Lee Cohen 2018 年 4 月 19 日
回答済み: John D'Errico 2018 年 4 月 19 日

Hello, I need to combine the following matrixes like this:

A=eye(5, 5); -> (size 5*5)

B=randi([-1 1],5 ,4); -> (size (5*4)

C=repmat(3,4,4); -> (size 4*4)

But when I typed M =[A, B; B, C] I got an error. How do I combine them?

採用された回答

John D'Errico
John D'Errico 2018 年 4 月 19 日

Of course you got an error. Did you write code for what you wanted? No.

This is what you wrote:

M =[A, B; B, C]

But what you claim to want to compute is:

M =[A, B; B', C]

There is a difference.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by