Multi dimensional array scaling
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
mark
el 19 de En. de 2014
Comentada: mark
el 20 de En. de 2014
Given the matrix A (where A is X by Y by Z matrix. Scale the matrix A such that every element in the kth page is scaled by 5k for k = 1,2,3...Z.
I would have to produce a matrix B such that with element wise multiplication with matrix A it gives me the scaled version.
I have tried messing around with repmat and reshape functions but I can't seem to get it
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 19 de En. de 2014
Editada: Azzi Abdelmalek
el 19 de En. de 2014
[n,m,p]=size(A)
out=5*reshape(repmat(1:p,n*m,1),size(A)).*A
Más respuestas (1)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!