Obtaining subimages with only the x axis values
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
shru s
am 6 Jun. 2017
Kommentiert: shru s
am 12 Jun. 2017
I have the following graph
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164910/image.bmp)
in between the vertical lines is the part of the image i wish to crop and save. Could anyone suggest how I can do this? Thank you
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 6 Jun. 2017
section_widths = diff( [0, list_of_x_values, size(YourImage,2)] );
sections = mat2cell( YourImage, size(YourImage,1), section_widths, size(YourImage,3) );
Now sections will be a cell array of matrices each containing one block. You can extract some of them using {} indexing, and save as desired.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!