clc; clear; close all; t=linspace(0,6,300);% t t1=linspace(2.8,3.2,300); % t1 y=sin(1./(t-3)); %y y1=sin(1./(t1-3)); % y1 figure; plot(t,y);axis('equal'); % plot the big figure axes('Position',[0.18,0.62,0.28,0.25]); % set the small figure plot(t1,y1); % plot the local small figure xlim([min(t1),max(t1)]); % set the axes range