一个matlab程序clear all;%%N = 512;x = linspace(0,1,N);[x,y] = meshgrid(x,x);Img_w = zeros(N)+255;Img_b = zeros(N);fx = [1 10 20 30 40 50 60 70 80 90 100];m = [1 0.95 0.85 0.7 0.5 0.25 0.1 0.03 0.02 0.008 0];for i = 1:size(fx,2)fringe(:,:,i) = 128
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 12:16:35
一个matlab程序clear all;%%N = 512;x = linspace(0,1,N);[x,y] = meshgrid(x,x);Img_w = zeros(N)+255;Img_b = zeros(N);fx = [1 10 20 30 40 50 60 70 80 90 100];m = [1 0.95 0.85 0.7 0.5 0.25 0.1 0.03 0.02 0.008 0];for i = 1:size(fx,2)fringe(:,:,i) = 128
一个matlab程序
clear all;
%%
N = 512;
x = linspace(0,1,N);
[x,y] = meshgrid(x,x);
Img_w = zeros(N)+255;
Img_b = zeros(N);
fx = [1 10 20 30 40 50 60 70 80 90 100];
m = [1 0.95 0.85 0.7 0.5 0.25 0.1 0.03 0.02 0.008 0];
for i = 1:size(fx,2)
fringe(:,:,i) = 128 + m(i)*128*cos(2*pi*fx(i)*x);
end
for i = 1:size(fx,2)
Imgtmp = fringe(:,:,i);
Imgtmp = (Imgtmp-Img_b)./(Img_w-Img_b);
hist = imhist(Imgtmp);
II = hist>0;
minI = find(II,1,'first');
maxI = find(II,1,'last');
MTF(i) = (maxI-minI)/(maxI+minI);
end
怎么让这个程序在显示一个图出来
一个matlab程序clear all;%%N = 512;x = linspace(0,1,N);[x,y] = meshgrid(x,x);Img_w = zeros(N)+255;Img_b = zeros(N);fx = [1 10 20 30 40 50 60 70 80 90 100];m = [1 0.95 0.85 0.7 0.5 0.25 0.1 0.03 0.02 0.008 0];for i = 1:size(fx,2)fringe(:,:,i) = 128
这个很简单啊
plot(fx,m,'*')
就好了