MATLAB draws bandwidth order diagram

clc,clear,close all  % 清理命令区、清理工作区、关闭显示图形
warning off       % 消除警告
feature jit off      % 加速代码运行
D0 = 20; % 阻止的频率点与频域中心的距离
W = 20;  % 带宽
n = 2;  % 阶次
x = 0:.5:80;
y = 0:.5:80;
[X,Y] = meshgrid(x,y);
for i=1:size(X,1)
    for j=1:size(X,2)
        D = sqrt( (X(i,j)-35).^2 + (Y(i,j) -35).^2  ); 
        Z(i,j)= 1./(1+(D*W./(D.^2-D0^2)).^(2*n));
    end
end
figure('color',[1,1,1])
mesh(X,Y,Z)

insert image description here

colormap turbo

insert image description here

colormap jet

insert image description here

colormap hsv

insert image description here
colormap hot
insert image description here
colormap cool
insert image description here
colormap spring
insert image description here

colormap summer

insert image description here

colormap autumn

insert image description here

colormap winter

insert image description here

colormap gray

insert image description here

colormap bone

insert image description here

colormap copper

insert image description here

colormap pink

insert image description here

colormap lines

insert image description here

colormap colorcube

insert image description here

colormap prism

insert image description here

colormap flag

insert image description here

colormap default

insert image description here
Development tools: MATLAB 2022b

Guess you like

Origin blog.csdn.net/m0_38127487/article/details/131877000