How to play Maximum length sequence twice?

2 views (last 30 days)
catarina
catarina on 22 Mar 2012
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

Answers (1)

Geoff
Geoff on 23 Mar 2012
If you just want to repeat your signal you can append a copy like this (assuming single-row vector):
x = [x x];
  1 Comment
catarina
catarina on 23 Mar 2012
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

Sign in to comment.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!