When I use delayseq() I the signal contains only zeros

4 ビュー (過去 30 日間)
Aidan Marrinan
Aidan Marrinan 2023 年 9 月 29 日
コメント済み: Aidan Marrinan 2023 年 9 月 29 日
%This is what I have so far:
fs = 8000; % sample frequency
f0 = 400;
T = 1/fs; %period
d = 2; %duration in secods
t = 0:T:d; % becomes a 1x16001 double
xn = sin(2*pi*f0*tc);
%d = 2 sec with 16001 samples. therfore a 1 second delay is delaying start by ~8000 samples
n_delay = 8000;
delayedsignal_xn = delayseq(xn,n_delay);
%However delayedsignal_xn just becomes 1x16001 double with only zeros even though its only been shifted by half its length.
%Any ideas what is up?

採用された回答

Walter Roberson
Walter Roberson 2023 年 9 月 29 日

scalar delay is applied individually to each column. Your row of signals is treated as many independent signals delayed by 8000 samples each.

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by