How to play Maximum length sequence twice?

2 次查看(过去 30 天)
Hello,
I need some help with maximum length sequence. My tutor gaves us a code with a transfer function measurement made with noise using the cross spectra equation Sxy/(Sxx*Sxy) where x and y are the input and output respectively. But I'm suppose to find out how to the measurement more accurate. I know I'm suppose to use maximum length sequence and from what I understand (correct me if i'm wrong) I should play the mls signal twice (2 periods) and use the second period to compute the calculation. Although I can't figure it out how do do the code to play the sequence twice. Signal, mls sequence and filter are underneath:
N = 1023;
[x fs bits] = wavread('mls1023'); %read in mls signal, input signal in x
[b,a] = cheby1(9,0.5,0.7,'High'); %generate a LTI system (a simple filter)
y = filter(b,a,x); %pass signal through LTI system
Thanks for any help in advance...
Catarina

回答(1 个)

Geoff
Geoff 2012-3-23
If you just want to repeat your signal you can append a copy like this (assuming single-row vector):
x = [x x];
  1 个评论
catarina
catarina 2012-3-23
Hi Geoff,
Thanks for this. How do I write the code to play the second part of the signal, being the first period to excite the filter and the second do compute the calculations?
Cheers
Catarina

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Measurements and Spatial Audio 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by