⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hem1.m

📁 该程序提供了多种参数的双指数脉冲函数的波形及其频谱分解图
💻 M
字号:
%%waveform.m%%
%%This Program is used for drawing exponential pulse waveform and frequency
%%decomposition

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N=2^18;
T=0.01;       %for 1.2/50us       %This parameter should be changed based on different waveform
%T=0.0001;     %for 0.7/60ns
deltT=T/N;
arrN=[0:1:N-1];

t=arrN*deltT;
alfa=1.625*10^4;  %1.2/50
beta=2.4562*10^6;  %1.2/50
K=1.04;
%alfa=0.018599*10^6; %2.6/40
%beta=1.364706*10^6;  %2.6/40
%K=1.0758

%alfa=0.045815*10^6; %8/20
%beta=0.271508*10^6; %8/20

%alfa=0.006953*10^6; %0.25/100
%beta=42.857143*10^6; %0.25/100
%K=3506.6

%alfa=0.002107*10^6; %10/350
%beta=0.291262*10^6; %10/350
%K=1.030376


%alfa=0.001733*10^6; %50/500us
%beta=0.048154*10^6; %50/500us

%alfa=34.89553*10^6; %2/23ns
%beta=1461.8571*10^6; %2/23ns
%K=1.1224;

%alfa=11.896*10^6; %0.7/60ns
%beta=3661.8571*10^6; %0.7/60ns
%K=1.0222;


wave=K*(exp(-alfa*t)-exp(-beta*t));  %双指数函数
%subplot(2,2,1),plot(t,wave);grid;axis([0,0.000004,0,1.04]),title('the front-waveform of 1.2/50us');
subplot(2,1,1),plot(t,wave);grid;axis([0,0.00008,0,1.1]),title('the full waveform of 1.2/50us');
%subplot(2,1,1),plot(t,wave);grid;axis([0,0.00000008,0,1.01]),title('the full waveform of 0.7/60ns');


%xlabel('time   s');
%ylabel('Amplitude   A');
%deltF=1/(T);
%ampf=(1/50)*abs(fft(wave))/1.055;

%frqn=arrN*deltF;
%subplot(2,2,1),semilogx(frqn,ampf);grid;axis([0,1000000,0,100]),title('the 0.25/100FFT waveform-amplitude');

%alfa=0.007030*10^6;  %1.2/100
%beta=2.500000*10^6;  %1.2/100
%alfa=0.018599*10^6; %2.6/40
%beta=1.364706*10^6;  %2.6/40

%wave=(exp(-alfa*t)-exp(-beta*t));


deltF=1/(T);
%ampf=(1/50)*abs(fft(wave));
ampf=abs(fft(wave))/N/deltF;
%ampf=20*(log(ampf));

frqn=arrN*deltF;
subplot(2,1,2),semilogx(frqn,ampf);grid;axis([0,100000,0,0.00008]),title('  the spectrum of 1.2/50us ');
xlabel('Frequency  Hz(log)');
ylabel(' Relative  Amplitude'   );
%subplot(2,1,2),semilogx(frqn,ampf);grid;axis([0,1000000000,0,0.0000001]),title(' the frequency spectrum of 0.7/60ns ');


%N=2^18;
%T=0.0001;
%deltT=T/N;
%arrN=[0:1:N-1];
%t=arrN*deltT;

%alfa=34.89553*10^6; %2/23ns
%beta=1461.8571*10^6; %2/23ns
%K=1.1224;
%wave=K*(exp(-alfa*t)-exp(-beta*t));  %双指数函数
%subplot(2,1,2),plot(t,wave);grid;axis([0,0.00000008,0,1.1]),title('the full waveform of 2/23ns');
%xlabel('time   s');
%ylabel('Amplitude   A');

%deltF=1/(T);
%ampf=abs(fft(wave))/N/deltF;

%frqn=arrN*deltF;
%subplot(2,1,2),semilogx(frqn,ampf);grid;axis([0,1000000000,0,0.00000004]),title('    the spectrum of 2/23ns ');
%xlabel('Frequency  Hz(log)');
%ylabel(' Relative Amplitude'   );



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -