This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clear,close,clc all | |
| function [mout] = mseq(n, taps, inidata, num) | |
| % **************************************************************** | |
| % n : m序列的階數n | |
| % taps : 反饋寄存器的連接位置 | |
| % inidata : 寄存器的初始值序列 | |
| % num : 輸出的m序列的個數 | |
| % mout : 輸出的m序列,如果num>1,則每一列為一個m序列 | |
| % **************************************************************** | |
| if nargin < 4 |