代码搜索结果
找到约 36,166 项符合
Raspberry Pi 的代码
figure_2_19.m
% for example 2.9 P49
N = 80;
n = 0:N;
x1 = sin(0.05*pi*n);
x2 = sin(0.15*pi*n);
x3 = sin(0.25*pi*n);
x = x1 + x2/3 + x3/5;
subplot(221),stem(n,x1);ylabel('x1');
subplot(222),stem(n,x2);ylabe
figure_2_20.m
% for example 2.10 P50
N = 350;
n = 0:N;
x1 = cos(0.1*pi*n);
x2 = cos(0.01*pi*n);
y = x1 .* x2;
subplot(311),plot(n,x1);title('x1=cos(0.1*pi*n)');
subplot(312),plot(n,x2);title('x2=cos(0.01*pi
program_11_13.m
% Program 11_13
% DFT Sample Computation Using CZT
%
n = 0:31;
x = sin(2*pi*11*n/64);
A = exp(i*2*pi*84/512);
V = exp(-i*2*pi/512);
XC = czt(x, 8, V, A);
disp('CFT Samples')
disp(abs(XC));
exp2_4_.m
close all
clc
clear
%定义时间范围
t=[0:pi/20:9*pi];
hold on %允许在同一坐标系下绘制不同的图形
plot(t,sin(t),'r:*')
plot(t,cos(t))
plot(t,-cos(t),'k')
grid on %在所画出的图形坐标中添加栅格,注意用在plot之后
hold off %覆盖旧图
exp2_3_.m
%plot绘图命令的使用
close all %关闭打开了的所有图形窗口
clc %清屏命令
clear %清除工作空间中所有变量
%定义时间范围
t=[0:pi/20:8*pi];
y=sin(t);
plot(t,y,'b:square')
% r表示线的颜色为红色,此外 y(黄色)g(绿色)b(蓝色)
%
exp2_4.m
close all
clc
clear
%定义时间范围
t=[0:pi/20:9*pi];
figure(1) %选择图像
plot(t,sin(t),'r:*')
grid on %在所画出的图形坐标中添加栅格,注意用在plot之后
grid off %删除栅格
figure(2)
plot(t,cos(t))
grid on
grid off
exp2_5_.m
%图形文字标示命令的使用
clear
close all
clc
t=[0:pi/20:5*pi];
plot(t,sin(t),'r:*')
axis([0 5*pi -1.5 1.5 ])
%给x轴和y轴命名
xlabel('t(deg)')
ylabel('magnitude')
%给图形加标题
title('sine wave from zero to 5\pi')
exp2_3.m
%plot绘图命令的使用
clc %清屏命令
clear %清除工作空间中所有变量
%定义时间范围
t=[0:pi/20:9*pi];
y1=sin(t);
y2=cos(t);
plot(t,y1,t,y2)
p3_5.m
% Program P3_5
% Modulation Property of DTFT
clf;
w = -pi:2*pi/255:pi;
x1 = [1 3 5 7 9 11 13 15 17];
x2 = [1 -1 1 -1 1 -1 1 -1 1];
y = x1.*x2;
h1 = freqz(x1, 1, w);
h2 = freqz(x2, 1, w);
h3 =
p3_2.m
% Program P3_2
% Time-Shifting Properties of DTFT
clf;
w = -pi:2*pi/255:pi; wo = 0.4*pi; D = 10;
num = [1 2 3 4 5 6 7 8 9];
h1 = freqz(num, 1, w);
h2 = freqz([zeros(1,D) num], 1, w);
subplot(2,