Passing binary sequence from matlab to simulink in scrambler

1 回表示 (過去 30 日間)
Pratham Chaurasia
Pratham Chaurasia 2022 年 1 月 19 日
回答済み: Ninad 2023 年 11 月 6 日
I have a simulink model which uses in-built scrambler and want to pass my binary code as input to the simulink model and want to get the scrambled output.

回答 (1 件)

Ninad
Ninad 2023 年 11 月 6 日
Hi Pratham,
As per my understanding, you are trying to use the in-built Simulink "Scrambler Block" to scramble the input binary code and want to get a scrambled output.
These high level steps will help you:
  1. Attach a "From Workspace" block to the input of "Scrambler Block".
  2. Attach a "To Workspace" block or a "Scope Block" to the output of "Scrambler Block" to visualize your output. Set the "Save format" block parameter of the "To Workspace" block to "array.
  3. Change the following block parameters of the "Scrambler Block":Calculation base = 2Set the "Scramble polynomial" and "Initial states".
  4. Assign a value to the "simin" variable from in the MATLAB workspace. This variable will be given as an input to the "Scrambler Block"Ex: >>simin = [1 0 1 0 1 1 1]
  5. Run the simulation, You could visualize the output in the "out.simout" variable
You may visit the following reference link to understand the Scrambler Block in detail:
I have attached a dummy Simulink model, named "scrambler_dummy.slx" for your reference.
Hope this helps.
Regards,
Ninad

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by