Adding certain 'parts' of two matrices

3 次查看(过去 30 天)
Hi guys,
I have two matrices:
A=[1 2;
3 4]
and
B=[0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0]
now I want to add matrix A to the second and third rows and columns of matrix B, so it becoms:
C=[0 0 0 0;
0 1 2 0;
0 3 4 0;
0 0 0 0]
How can I do that?
Thank you all guys.

采纳的回答

Stephen23
Stephen23 2019-4-17
编辑:Stephen23 2019-4-17

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by