Distribute matrix elements to smaller grids.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sourangsu Chowdhury
el 3 de Feb. de 2019
Respondida: Guillaume
el 3 de Feb. de 2019
I need to distribte matrix elements into a smaller grid size.
For example, I have a matrix with size 2x2
[10 20
30 40]
I want a matrix with size 4x4 by distributing the elements into a finer resolution.
[2.5 2.5 5 5
2.5 2.5 5 5
7.5 7.5 10 10
7.5 7.5 10 10]
I could do this using resizem and then dividing each element by 4. Is there any other efficient way to do this?
0 comentarios
Respuesta aceptada
Guillaume
el 3 de Feb. de 2019
Easily:
M = [10 20;
30 40];
scaling = 2;
repelem(M/scaling^2, scaling, scaling)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Encryption / Cryptography 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!