Skip to content

Instantly share code, notes, and snippets.

View L593's full-sized avatar

Li Xuefei L593

  • Qingdao
  • 06:25 (UTC -12:00)
View GitHub Profile
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