how to crop a matrix in matlab?
123 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i am getting a matrix as output and its size is[1000*77868] because of having many element, i cant see the matrix. it is displaying like"cannot displays element more than 53866. is there any possibility to see the matrix or how to crop the matrix to[512*4000]??
0 Commenti
Risposte (2)
Image Analyst
il 29 Nov 2015
Of course you could always look at the variable in the variable editor and see the whole thing .
Or try this. For some upper left row and column:
croppedMatrix = matrix(row1:row1+511, column1:column1+3999);
2 Commenti
Walter Roberson
il 30 Nov 2015
You said you wanted the matrix cropped to 512*4000 but you did not say where those 512 x 4000 should be positioned within the original matrix. You would define row1 as the first row you want included and column1 as the first column you want included. If you want the "top left" of the matrix that would be
croppedMatrix = matrix(1:512, 1:4000);
Walter Roberson
il 30 Nov 2015
The limitation of 53866 is only in the variable editor. To see the whole matrix you can give its name at the MATLAB prompt.
0 Commenti
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!