How can I control the output data type of the "Signal Editor" block?

8 ビュー (過去 30 日間)

How can I control the output data type of the "Signal Editor" block?

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 8 月 16 日
You can control the output data type by changing the data types in the MAT file that you pull your signal data from. However, if you are starting from scratch with no existing MAT files, then you can follow the workflow below:
1. First open the "Signal Editor" Block Parameters window and click the button at the top to launch the Signal Editor app.
2. If you want to set a default data type for all signals, click "Defaults" in the toolstrip and select a default data type, e.g. "single", or "int16":
3. Then give your scenario a name. Add some signals under it and name those too, as can be seen in the image from step (2).
4. Define the range of your data in the right-hand pane. You also have the option to choose a different data type here:
5. Select "Save as" from the toolstrip, and save your MAT file.
6. Return to the "Signal Editor" Block Parameters window and load the MAT file. Apply your changes then connect up your model.
7. Go to the
Simulink Toolstrip > Debug > Information Overlays > Ports 
menu and select "Base Data Types":
8. Press Ctrl+D to update your model and observe that the data types from your MAT file data have now propagated to the outputs of the "Signal Editor" block.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Model Editing についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by