Skip to main content
Sign in
Snippets Groups Projects
Commit 22c0921d authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Add iddata implementation for prbs signals

parent adf65142
No related branches found
No related tags found
No related merge requests found
function idinput(N, class = "prbs"; band = 1)
output = zeros(N)
if lowercase(class) == "prbs"
start = 0x02;
a = start;
for i = 1:N
newbit = (((a >> 12) $ (a >> 3) $ (a >> 2) $ (a >> 0)) & 1);
a = ((a << 1) | newbit) & 0x7f;
output[i] = newbit
end
if band > 1
output = repmat(output',band,1)[1:N]
end
else
warn("Input class $class not supported")
end
return output
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment