NEW RELEASE! The 2022x Refresh2 Hot Fix 3 was released on February 28, 2025. For more information, see 2022x Refresh2 Hot Fix 3 Version News.

To generate a Simulink model directly from the modeling tool


  1. Right-click the block TestBed and select Tools Export to Simulink.


  2. In the Simulink Export Options dialog, set the options listed below and click OK:

    • Format: XML (.slx)

    • S-Function or Simscape: S-Function version 2



  3. Launch Matlab with Simulink extension, and open the TestBed.slx file with the help of the Current Folder browser.



  4. In the Current Folder panel, double-click on the file named TestBed.slx. The TestBed model will open up in a new Simulink window. Rearrange the blocks to reflect the signal flow arrowheads.



  5. Open the Library Browser either by clicking the Library Browser icon or by going to Tools > Library Browser. Click Simulink> Sinks and select Scope.



  6. Drag and drop one Scope block from the Sinks library list into the TestBed Simulink model. Attach a signal line segment from the Scope port onto the signal line that connects the dsp block and the scopeSignalOutput block. Repeat the process of adding a Scope block and attaching it to the signal line that connects the inputSignal block to the dsp block.



  7. Go to Modeling>Model Settings:
    1. In the Simulation time section Select the Start Time as 0, and the Stop Time as 20.

    2. In the Solver selection section, select Variable-step as the solver type.

    3. In the Solver details section, set the Max step size to 0.01, click Apply, and then click OK.



  1. Go to Simulation>Run. Double-click on the Scope blocks to see the simulation results.


Activity

All
Personal filters
All