1 楼: 上官蝶威媼
用mesh函數就可以了。下面給你一個例子
clear
clc
close all;
%%%%testing image and it's frequency response
x=zeros(256,256);
x(100:158,30:220)=1;
figure(1)
imshow(x,[])
f_x=fft2(x);
figure(2)
mesh(abs(real(f_x)))%三維頻譜圖
運行結果如下:
2 楼: zdxzym
在最後接着寫:
[m,n]=size(A);
[x,y]=meshgrid(1:m,1:n);
mesh(x,y,A)
%surf(x,y,A) %或者surf