EE261 Problem Set 6
课程主页:https://see.stanford.edu/Course/EE261
这次回顾Problem Set 6。
Problem 1
只要没有重合即可,考虑如下两种极限情形:
所以结果为
Problem 2
(a)利用$\text{III}$函数对原式进行化简可得
取傅里叶变换可得
取逆变换可得
对比采样定理
只要利用第一个式子求解出第二个式子的系数即可,其条件为采样间隔大于带宽,即$\frac 1 T >2 B$
Problem 3
因为
取傅里叶变换可得
按$\frac 2 3$采样即使用$\text{III}_{\frac 2 3}$,所以
按照$\frac 2 3 $赫兹截断,那么
取傅里叶逆变换可得
Problem 4
由采样定理,我们得到
其中
对上式积分
现在计算
我们有
注意到上述积分为傅里叶变换在$s=0$处的值,所以
因此
Problem 5
% (a)
d1 = imread("man.gif");
%转换类型
%data = im2double(data);
d2 = d1(:);
d3 = double(d2);
d4 = d3 / max(d3);
n = length(d4);
% (b)
x = fft(d4);
l = length(x);
% 中心化
x_center = [x(l/2 + 1: end); x(1: l/2)];
plot([-l/2: l / 2 - 1], abs(x_center))
% (c)
E_total = norm(x_center) ^ 2;
E_partial = zeros(1, l / 2);
E_partial(1) = abs(x(1)) ^ 2;
for i = 2: (l / 2 - 1)
E_partial(i) = E_partial(i - 1) + 2 * abs(x(i)) ^ 2;
end
%比例
ratio = E_partial / E_total;
Alpha = [0.9, 0.95, 0.99];
%Type = ['nearest', 'linear'];
cnt = 1;
for i = 1: 2
for j = 1: 3
%type = Type(i);
if i == 1
type = 'nearest';
else
type = 'linear';
end
alpha = Alpha(j);
%计算p
p = double(find_p(ratio, alpha));
%采样频率
rate = floor(n / (2 * p));
%索引
index = 1: rate: n;
%对应的值
x_res = d4(index);
%插值
res = interp1(index, x_res, 1: n, type);
%恢复图像
res = max(d3) * res;
res = reshape(res, 256, 256);
%作图
figure(cnt);
imagesc(res);
colormap('gray');
title(['\alpha =' num2str(alpha) ', ', type]);
cnt = cnt + 1;
end
end
结果如下:
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Doraemonzzz!
评论
ValineLivere