How to create a 3D matrix from subtracting 2D matrices (like creating 2D matrix from subtracting vectors)?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohit Kumar
am 19 Jan. 2022
Kommentiert: Mohit Kumar
am 19 Jan. 2022
Hi,
I wish to extend the behavior of subtracting a row vector and a column vector to matrices. Let me provide an example: Suppose A and B are two n x n matrices. I want to obtain matrix C such that C(:,:,i) = A(:,i)-B(i,:), i runs from 1 to n.
Is there a way to do this without for-loops?
Thanks,
Mohit.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!