• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-12
  • 语言: Matlab
  • 标签: 阶比仿真  

资源简介

阶比仿真,matlab版,调试好的,绝对管用。

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%阶比仿真,2011年3月21日
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
Fs=256;Ts=1/Fs;N=2048;t=0*Ts:Ts:(N-1)*Ts;
%采样时间为8秒
x=sin(2*pi*t.^2);%0.8*randn(size(t));
y1=(abs(fft(x)))*2/N;f1=(0:N/2-1)*Fs/N;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fc=128;%理想低通滤波器截止频率
wc=2*fc*pi;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%转速信号,1024转
n=2*60*t;%转速
i=1;
a=zeros(32);
for nn=1:32
  %  if nn==1
  %  a(1)=0;
    %else
    a(nn)=sqrt(nn*2);
    %end
   % i=i+1;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b=[0;2*pi;4*pi];
kk=1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%计算等角度时刻
y=zeros(112);
for i=1:2:length(a)-3
    A=[1a(i)a(i)^2;1a(i+1)a(

评论

共有 条评论

相关资源