代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
ex030500.m
subplot(1,1,1)
n = 0:10; x = (0.9*exp(j*pi/3)).^n;
k = -200:200; w = (pi/100)*k;
X = x * (exp(-j*pi/100)) .^ (n'*k);
magX = abs(X); angX =angle(X);
subplot(2,1,1); plot(w/pi,magX);grid
axis([-2,
ex031300.m
w = [0:1:500]*pi/500; % [0, pi] axis divided into 501 points.
X = exp(j*w) ./ (exp(j*w) - 0.9*ones(1,501));
magX = abs(X); angX = angle(X);
subplot(2,1,1); plot(w/pi,magX); grid; axis([0,1,0,10])
ex030900.m
n = 0:100; x = cos(pi*n/2);
k = -100:100; w = (pi/100)*k; % frequency between -pi and +pi
X = x * (exp(-j*pi/100)).^(n'*k); % DTFT of x
%
y = exp(j*pi*n/4).*x; % signal mu
ex039900.m
w = [-100:100]*pi/100; % frequency between -pi and +pi
N = 5;
X1 = sin((w+eps)*N/2)./sin((w+eps)/2);
N = 15;
X2 = sin((w+eps)*N/2)./sin((w+eps)/2);
N = 25;
X3 = sin((w+eps)*N/2)./sin((w+eps)/2);
ex030300.m
w = [0:1:500]*pi/500; % [0, pi] axis divided into 501 points.
X = exp(j*w) ./ (exp(j*w) - 0.5*ones(1,501));
magX = abs(X); angX = angle(X);
realX = real(X); imagX = imag(X);
subplot(2,2,1); plot(
ex030400.m
% Chapter 3: Example 3.4:
% DTFT of finite duration seq using mat-vec operation
%
n = -1:3; x = 1:5; % sequence x(n)
k = 0:500; w = (pi/500)*k; % [0, pi] axis divided in
ex030600.m
subplot(1,1,1)
n = -5:5; x = (-0.9).^n;
k = -200:200; w = (pi/100)*k;
X = x * (exp(-j*pi/100)) .^ (n'*k);
magX = abs(X); angX =angle(X);
subplot(2,1,1); plot(w/pi,magX);grid
axis([-2,2,0,15])
x
ex031000.m
n = -5:10; x = rand(1,length(n)) + j*rand(1,length(n));
k = -100:100; w = (pi/100)*k; % frequency between -pi and +pi
X = x * (exp(-j*pi/100)).^(n'*k); % DTFT of x
% conjugation property
ex050800.m
% Chapter 05: Example 05.08: HiRes Spectrum
%
% High resolution spectrum based on 100 samples of the signal x(n)
subplot(1,1,1)
n=[0:1:99];
x=cos(0.48*pi*n)+cos(0.52*pi*n);
subplot(2,1,1);stem(n
ex050600.m
% Chapter 05: Example 05.06: Simple DFT Example
%
x = [1,1,1,1];
subplot(1,1,1);
%
% a) DTFT
w = [0:1:500]*2*pi/500;
[H] = freqz(x,1,w);
magH = abs(H); phaH = angle(H); phaH(126)=-47.5841*pi/1