f=-1:0.1:1;
w=2*pi.*f;
%w = -2*pi:0.1:2*pi;
Hw=abs(1./((j*w).^2+j*w+1));
Hw1=20.*log(Hw);
plot(f,Hw1);
注意: ./ .^2 .*,,,向量都要加点的,尤其是./
f=-1:0.1:1;
w=2*pi.*f;
%w = -2*pi:0.1:2*pi;
Hw=abs(1./((j*w).^2+j*w+1));
Hw1=20.*log(Hw);
plot(f,Hw1);
注意: ./ .^2 .*,,,向量都要加点的,尤其是./