Code covered by the BSD License  

Highlights from
m-sequence generation program using a search algorithm

Be the first to rate this file! 15 Downloads (last 30 days) File Size: 1.92 KB File ID: #27133

m-sequence generation program using a search algorithm

by Giedrius Buracas

 

31 Mar 2010

Generates maximum length sequences (m-sequences) of length a^b-1, where a is any prime number <=31

| Watch this File

File Information
Description

Maximum length sequence assuming distinct
values = baseVal^powerVal-1

        [ms]=mseqSearch(powerVal,baseVal)
 
        OUTPUT:
          ms: generated maximum length sequence, of length
                    basisVal^powerVal-1 such that all values occur
                    with equal frequency=basisVal except zero,
                    which occurs basisVal-1 times
 
           INPUT:
  baseVal: any prime number up to 31
                  powerVal: an integer
           NB: the algorithm is performing search in m-sequence
                  register space so the calculation time grows with
                   baseVal and powerVal
                   Tested on Matlab 7.9.0 (R2009b)
 
  (C) Written by Giedrius T. Buracas, SNL-B, Salk Institute
                    and Center for Functional MRI, UCSD

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
18 Jan 2012 Karin

Everything is working well. I just wondered if I could ask a question: My understanding is that in theory it is possible to create m-sequences when the number of levels is a power of a prime integer (so, for example,for an experiment that uses 9 stimuli). Is that possible within this program, or can I only generate sequences in which the number of levels is a prime integer?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
communications Giedrius Buracas 01 Apr 2010 11:03:06
control design Giedrius Buracas 01 Apr 2010 11:03:06
signal processing Giedrius Buracas 01 Apr 2010 11:03:06
medical Giedrius Buracas 01 Apr 2010 11:03:06
system identification Giedrius Buracas 01 Apr 2010 11:03:06
wireless Giedrius Buracas 01 Apr 2010 11:03:06

Contact us at files@mathworks.com