用fplot和plot作出函数图像
法一
clc,clear;
close all;
x=linspace(0.01,0.02,50);
y=sin(1./x);
subplot(2,1,1),plot(x,y);
subplot(2,1,2),fplot(@(x)sin(1./x),[0.01,0.02]);
法二
clc,clear;
close all;
x=linspace(0.01,0.02,50);
y=sin(1./x);
y1=@(x)sin(1./x);
subplot(2,1,1),plot(x,y);
subplot(2,1,2),fplot(y1,[0.01,0.02])