undefined function or variable 'sigshift'

5 ビュー (過去 30 日間)
bro
bro 2020 年 10 月 30 日
編集済み: bro 2020 年 10 月 30 日
clear all
close all
clc
% noise sequence 1
x = [3,11,7,0,-1,4,2]; nx = [-3,3];
[y,ny] = sigshift(x,nx,2);
w = randn(1,length(y)); nw = ny;
[y,ny] = sigadd(y,ny,w,nw);
[x,nx] = sigfold(x,nx);
[rxy,nrxy] = conv_m(y,ny,x,nx);
subplot(1,1,1),subplot(2,1,1);stem(nrxy,rxy)
axis([-5,10,-50,50]); xlabel('lag variable 1')
ylabel('rxy'); title('Crosscorrelation: Noise sequence 1')

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 30 日
編集済み: Ameer Hamza 2020 年 10 月 30 日
As mentioned in Walter's answer here: https://www.mathworks.com/matlabcentral/answers/268957-undefined-function-or-variable-sigshift-how-can-i-shift-the-signal, sigshift is a function inside the FEX package: https://www.mathworks.com/matlabcentral/fileexchange/2189-digital-signal-processing-using-matlab. It does not come with MATLAB by default. Download the FEX package and place it on your MATLAB's path. Then you will be able to use the function.

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by