Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fredrik Bagge Carlson
SystemIdentification
Commits
22c0921d
Commit
22c0921d
authored
Sep 06, 2015
by
Fredrik Bagge Carlson
Browse files
Add iddata implementation for prbs signals
parent
adf65142
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/idinput.jl
0 → 100644
View file @
22c0921d
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment