Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-05-17
年龄: 39
帖子: 1
声望力: 0 ![]() |
![]()
下面这程序,我调试时出问题,但不知道怎样改,请高手帮我改下,谢谢~~~
源程序如下来源与dedekd ) clc clear close all %==================================正弦波================================== width=8; %宽度是8 depth=1024; %深度是1024 t=0:1e-8depth-1)*1e-8; %采样频率是100MHz w=2*pi*1e6; %正弦波频率1MHz sin_a=(sin(w*t)+1)/2; %归一化 sin_d=fix(sin_a*(2^width-1)); %量化 plot(sin_d); axis([0,depth-1,0,2^width-1]); |
![]() |
![]() |