2024年3月11日发(作者:雷蛇)
Q1-1:
修改程序Program1_1,将dt改为0.2,再执行该程序,保存图形,看看所得图形
的效果如何?
dt = 0.01时的信号波形 dt = 0.2时的信号波形
此处粘贴图形 此处粘贴图形
这
两幅图形有什么区别,哪一幅图形看起来与实际信号波形更像?
答:
Q1-2:
修改程序Program1_1,并以Q1_2为文件名存盘,产生实指数信号x(t)=e
-2t
。 要求
在图形中加上网格线,并使用函数axis()控制图形的时间范围在0~2秒之间。然后执行该程
序,保存所的图形。
修
改Program1_1后得到的程序Q1_2如下:
% Q1_2
% This program is used to generate a sinusoidal signal and draw its plot
clear, % Clear all variables
close all, % Close all figure windows
dt = 0.01; % Specify the step of time variable
t = 0:dt:2; % Specify the interval of time
x = exp(-2*t);
subplot(211) % Generate the signal
plot(t,x) % Open a figure window and draw the plot of x(t)
title('Sinusoidal signal x(t)')
xlabel('Time t (sec)')
信号x(t)=e
-0.5t
的波形图:
Q1-3:
修改程序Program1_1,并以Q1_3为文件名存盘,使之能够仿真从键盘上任意输
-2t
入的一个连续时间信号,并利用该程序仿真信号x(t)=e。
修
改Program1_1后得到的程序Q1_3如下: 信号x(t)=e
-2t
的波形图
% Q1_3
% This program is used to generate a sinusoidal signal and draw its plot
clear, % Clear all variables
close all, % Close all figure windows
dt = 0.01; % Specify the step of time variable
t = 0:dt:2; % Specify the interval of time
x = exp(-2*t);
subplot(211) % Generate the signal
plot(t,x) % Open a figure window and draw the plot of x(t)
title('Sinusoidal signal x(t)')
xlabel('Time t (sec)')
grid on,axis([0,2,0,1])
此处粘贴图形
发布者:admin,转转请注明出处:http://www.yc00.com/num/1710140196a1707423.html
评论列表(0条)