How to create this matrix ?
Show older comments
I have a matrix whose size is 2x5x2 double and i have another matrix which is 2X5 double ,i just want to add together and make a simple matrix A,
in this A matrix there will be 2 rows ,total 15 column .
2 Comments
Sam Chak
on 10 Jul 2022
Hi @Akash Pal
Can you really add matrices of incompatible sizes?
Akash Pal
on 10 Jul 2022
Accepted Answer
More Answers (1)
Despite the Matrix Law forbids the operation, we can nearly always perform miracles with MATLAB, so long as you give the example of the desired output. Given M and N, how do you want to display the output of 
M(:,:,1) = [1 2 3 4 5; 6 7 8 9 10];
M(:,:,2) = 2*[1 2 3 4 5; 6 7 8 9 10];
M
N = 3*M(:,:,1)
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!