
How to stretch the cells of a matrix ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexandre Briclot
le 21 Oct 2017
Réponse apportée : Pippa Williams
le 11 Fév 2020
Hello all, Let's say I have a 30*30 matrix and I want to display an image of the data in it, but I want the image to be for example 2 times longer than wide. I just want to "stretch" the cells in the x-direction. The ratio between the length and the width would be given by the ratio between Lx and Ly. I found nothing related to this using the image function in Matlab.
Thanks.
0 commentaires
Réponse acceptée
Plus de réponses (1)
Pippa Williams
le 11 Fév 2020
Another (perhaps simpler) option if you have R2015a or later: repelem ("repeat elements") will also do.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!