Product of matrix with other matrix elements (or array cells)
Mostrar comentarios más antiguos
%Solved by Oleg Komarov, see his reply below. And additionally by Oleg and Prabhakar for more advanced problem where A = [a b; c d] and a,b,c,d are rand(3,3).
%I'm not sure how to achieve the following:
%Matrix A
A = [2 0; 0 3]
%Matrix C
C = [1 -1;-1 1]
%How do I get each entry in matrix C multiplied by matrix A, to get a 4x4 matrix, as a function of A and C, without explicitly having to type:
[A -A;-A A]
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!