How to zoom in to a particular point of an image?

75 次查看(过去 30 天)
Hi,
I'm trying to zoom in to a particular point of an image and not the full image.
In the above figure, I want to zoom in to the point n=4.9 only.
Kindly let me know as how it is to be done.
with regards,
rc
  2 个评论
Shubham
Shubham 2023-9-8
Refer to this MATLAB Answer and see if it works out for you
Add your image path zoom_image.m file and then adjust the position and change the zoom percentage.
Rahul
Rahul 2023-9-8
Hi,
Thanks for your advice.
But the code as above in the shared link doesn't detect a matlab (.m) file. It can detect jpg file.
Actually, I want something like this as below where the magnified image is superimposed with the original
for my profile which I want to zoom in at n=4.9 and superimpose with my original profile.
Not sure if the shared code can do this.
with rgds,
rc

请先登录,再进行评论。

采纳的回答

Dyuman Joshi
Dyuman Joshi 2023-9-8

更多回答(1 个)

Image Analyst
Image Analyst 2023-9-8
Try changing the axis limit by calling xlim and ylim to be the ranges you want.
help xlim
XLIM Set or query x-axis limits XLIM(limits) specifies the x-axis limits for the current axes. Specify limits as a two-element vector of the form [xmin xmax], where xmax is a numeric value greater than xmin. xl = XLIM returns a two-element vector containing the x-axis limits for the current axes. XLIM(limitmethod) specifies the method used to determine the x-limits for the current axes. Specify the limitmethod as 'tickaligned', 'tight', or 'padded'. This command sets the XLimitMethod property on the axes. m = XLIM('method') returns the current method for setting the x-axis limits, which can be 'tickaligned', 'tight', or 'padded'. By default, the method is 'tickaligned'. XLIM(limitmode) specifies automatic or manual x-limits selection. Specify the limitmode as either 'auto' or 'manual'. This command sets the XLimMode property on the axes. m = XLIM('mode') returns the current value of the x-axis limits mode, which is either 'auto' or 'manual'. By default, the mode is automatic unless you specify limits or set the mode to manual. ___ = XLIM(ax, ___ ) uses the axes specified by ax instead of the current axes. XLIM sets or gets the XLim, XLimMode, or XLimitMethod property of an axes. See also PBASPECT, DASPECT, YLIM, ZLIM, THETALIM, RLIM. Documentation for xlim doc xlim

类别

Help CenterFile Exchange 中查找有关 Data Exploration 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by