Help with generating time-varying digital signal in simulink
Show older comments
Hey,
I am using simulink to describe a filter structure which I want to have 8 bits wide input to represent a word. I am for instance using Flip Flops from the Simulink Extras' library.
However, I want to generate an input signal to this filter and tried it using embedded matlab but I don't get it working. Most of the time I get errors complaining about the port widths and that there is a mismatch. I've not really used simulink before but what I am trying to do (and guess that I should do) is basically to generate an array of size [num_time_steps 8] and that every time slot output [1 8] to the input of my filter.
Can someone please send me a link to a simple example so that I understand how I can do this?
Or can I do it in another fashion?
Answers (1)
Fangjun Jiang
on 16 Jun 2011
0 votes
If you have the Communication Systems Toolbox, you may use the "Integer to Bit Converter" block. You just need to connect it to a "Random Number" block. If you don't, then you might be able to use the randint() or randi() function in MATLAB. Use the "MATLAB Fcn" block.
Categories
Find more on Signal Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!