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

📄 examp31.m

📁 ADSP TOOLBOX: Version 2.0 and gui m-files
💻 M
字号:

clc,echo on 
%EXAMPLE 31 
x=0:8;h=0:3;                     % Signals x and h 
nx=0:8;nh=0:3;                   % DT index for x and h 
rxx=conv(x,fliplr(x));           % Autocorrelation rxx 
rhh=conv(h,fliplr(h));           % Autocorrelation rhh 
nhh=-3:3;nxx=-8:8;               % DT index for rhh and rxx 
[mx, i1] = find(rxx==max(rxx));  % Maximum rxx and its MATLAB index 
[mh, i2] = find(rhh==max(rhh));  % Maximum rhh and its MATLAB index 
[mx,i1,mh,i2]
nxxm=nxx(i1);nhhm=nhh(i2);       % DT index of max rxx and rhh 
[nxxm, nhhm]
rxh=conv(x,fliplr(h));           % Cross-correlation rxh 
rhx=conv(h,fliplr(x));           % Cross-correlation rhx 
nxh=-3:8;nhx=-8:3;               % DT index for rxh and rhx 
dtplot(nxx,rxx,'o'),pause(2)     % Plot rxx (similar statements for others) 
h1=[0 0 0 0 h];n=0:7;            % Shifted h and its DT index 
rhd=conv(h,fliplr(h1));          % Correlation of h and h1 
nhd=-7:3;                        % DT index for rhh1 
rhd2=conv(h1,fliplr(h));         % Correlation of h1 and h 
nhd2=-3:7;                       % DT index for rhh2 
dtplot(nhd,rhd,'o'),pause(2)     % Plot rhd
dtplot(nhd2,rhd2,'o')            % Plot rhd2
echo off %end of example

⌨️ 快捷键说明

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