Plot inside a plot with automatic adjustment

I am using a plot inside a plot based on kindly instructions from this community. My problem, however, is that the internal box should always be at the corner of the curve of the external box; the internal box size (height and width) should always adjust itself to touch to the line described by the function of the external box. At the figure attached this was done manually. Looking forward to hearing from you. Thanks a lot.
a=1;ro=0.5;pref1=5;pref2=5;z=10:87:10401 ; x2=a*((z.^(1./ro)).*(1./(z.^pref2))).^(1./pref1); y2 = y;%sin(2*pi*x2); x1 = linspace(0,pi/2); y1 = 2*cos(x1/3.3); figure(1) plot(x1,y1) axes('Position',[.13 .11 .5 .5]) box on plot(x2,y2)

답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2018년 6월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by