Function can accept bit lengths of between 2 and 24
y is a vector of 1's & -1's that is (2^n)-1 in length.
Christopher Brown (2019). mls.m (https://www.mathworks.com/matlabcentral/fileexchange/1246-mls-m), MATLAB Central File Exchange. Retrieved .
Well, good one. But there is a mistake in my opinion: You didn't pay attention to the fact that 1's and 0's have to be in a row. For example: with n and length (2^n-1):
1 - time : A n-digit sequence of 1s
1 - time : A (n-1)-digit sequence of 0s
each 1-time: (n-1)-digit sequence of 1s and 0s
Please correct me if I am wrong, but I get a m-sequence for
n = 2: [-1 1 -1] which is wrong !
n=3: [1 -1 1 -1 -1 -1 1] which isn't correct either !
Great stuff. Executed quickly even for larger register lengths (Took 40 seconds for n=17 using Octave). Completely octave compatible, no changes necessary.
Apologies if the star rating doesn't come out right (should be 5, but the site is doing some weird things).
very efficient code
I apologize... I made a mistake in the stating that there is an error in the primitive polynomial list. Those tap lists are correct.
There are couple issues with this MLS sequence generator. The primitive polynomial list has a few errors (lines 29-180). This list is not necessary given that Matlab has a built in function to generate these (gfprimdf.m) For example, the 7th order MLS
sequence output is incorrect. Given the use of the tap list, this code is slightly inefficient.
this tool works fine and is easy to use.
Just what you expect from it. Thanx.
Excellent code for a binary pseudorandom sequence generation.
The use of MLS forms a powerful method for the accurate determination of Impulse Response in LTI system.
Inspired: MLS generator