plotting a region of a matrix

2 views (last 30 days)
wouter
wouter on 4 Jun 2014
Commented: wouter on 4 Jun 2014
I have loaded a data set into matlab, but i just want to make a surface plot a small region of the entire matrix. Right now it is a 544x512 uint16 matrix, but i just want to use the region 300/544, 200/512. how can I do this?
So far, this is the code:
colormap(hsv) surf(double(Data))

Accepted Answer

Image Analyst
Image Analyst on 4 Jun 2014
subRegion = Data(300:end, 200:end); % Extract sub-rectangle of full data.
surf(subRegion);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!