Transforming a matrix into linear one dimensional output ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hi, Suppose I have a matrix A=[1 2 3 4 5 6 7 8;9 10 11 12 13 14 15 16;17 18 19 20 21 22 23 24;25 26 27 28 29 30 31 32;33 34 35 36 37 38 39 40;41 42 43 44 45 46 47 48;49 50 51 52 53 54 55 56;57 58 59 60 61 62 63 64] Now I want linear output as [1 2 9 10 3 4 11 12 17 18 25 26 19 20 27 28 5 6 13 14 7 8 15 16 21 22 29 30 23 24 31 32 33 34 41 42 35 36 43 44 49 50 57 58 51 52 59 60 37 38 45 46 39 40 47 48 53 54 61 62 55 56 63 64];
I am in urgent need of it?
Thanks
2 commentaires
Image Analyst
le 2 Mar 2014
How is this any different than your prior question http://www.mathworks.com/matlabcentral/answers/119697#answer_126680???
Réponse acceptée
Image Analyst
le 2 Mar 2014
OK, I see that it's very similar to your prior question but slightly different. You have the concept. For this very specific and peculiar way of visiting all the pixels, you're just goin to have to use for loops to visit the 2x2 blocks of pixels in the specific order that you want.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Mathematics and Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!