数据和函数可视化.docVIP

  • 3
  • 0
  • 约1.52万字
  • 约 22页
  • 2018-12-22 发布于湖北
  • 举报
PAGE PAGE 21 数据和函数的可视化 引导 离散数据和离散函数的可视化 【例5.1-1】图形表示离散函数。 n=(-10:10); %产生一组自变量数据 y=abs(n); %函数的数组算法计算相应点的函数值 plot(n,y,r.,MarkerSize,20) axis equal grid on %画坐标方格 xlabel(n) 图 5.1-1 离散函数的可视化 连续函数的可视化 【例5.1-2】用图形表示连续调制波形。 t1=(0:11)/11*pi; %12个采样点偏少 t2=(0:400)/400*pi; %401个采样点密集 t3=(0:50)/50*pi; %51个采样点已够 y1=sin(t1).*sin(9*t1); %数组运算 y2=sin(t2).*sin(9*t2); y3=sin(t3).*sin(9*t3); subplot(2,2,1),plot(t1,y1,r.) axis([0,pi,-1,1]),title((1)点过少的离散图形) subplot(2,2,2),plot(t1,y1,t1,y1,r.) axis([0,pi,-1,1]),title((2)点过少的连续图形) subplot(2,2,3),plot(t2,y2,r.) axis([0,pi,-1,1]),

文档评论(0)

1亿VIP精品文档

相关文档