Help CenterHelp Center
Pseudorandom binary sequence
p = prbs(O,N)
[PRBS,seed] = prbs(O,N)
[PRBS,seed] = prbs(O,N,seed)
example
p = prbs(O,N) calculates a pseudorandom binary sequence P of order O and length N.
p
O
N
P
[PRBS,seed] = prbs(O,N) calculates a pseudorandom binary sequence and the seed needed to continue the sequence.
PRBS
seed
[PRBS,seed] = prbs(O,N,seed) calculates a pseudorandom binary sequence and the seed needed to continue the sequence using the seed value.
collapse all
Create a vector using a pseudorandom binary sequence (PRBS) pattern of the order 4.
O = 4; N = 2^O-1; pattern1 = prbs(O,N);
Create another vector, this time using a PRBS pattern of order 4 one bit at a time.
pattern2 = zeros(1,N); [pattern2(1),seed] = prbs(O,1); for ii = 2:N [pattern2(ii),seed] = prbs(O,1,seed); end
Verify that both patterns are the same.
disp(isequal(pattern1,pattern2))
1
Order of the pseudorandom binary sequence pattern, specified as a positive integer scalar.
Data Types: double
double
Length of the pseudorandom binary sequence pattern, specified as a positive integer scalar.
Pseudorandom binary sequence pattern of order O and length N, returned as a vector.
Seed value of the pseudorandom binary sequence pattern, returned as a vector. seed is used in subsequent calls to continue the PRBS pattern.
wave2pulse | pulse2wave
wave2pulse
pulse2wave
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office