simulink to workspace using simout as a scalar value

4 ビュー (過去 30 日間)
vishnuvardhan naidu tanga
vishnuvardhan naidu tanga 2020 年 3 月 3 日
回答済み: Harshal Ritwik 2023 年 6 月 19 日
hello everyone,
I need to get the data from simulink to workspace, to do that i have used simout block. BUt i am getting a timeseries . I have even used the array output but still i am getting a multiple output. Is there any way to calculate a single scalar value instead of time series and multple values.
thanks in advance

回答 (1 件)

Harshal Ritwik
Harshal Ritwik 2023 年 6 月 19 日
Hi,   
As per my understanding you want to know how to get a scaler output by using the “To Workspace” block. If the signal output from your Simulink model is a scalar, then the "To Workspace" block will save the output as a scalar in the workspace variable. If the signal output is a vector or matrix, then the output saved to the workspace variable will be in the form of a vector or matrix accordingly.
So, there is no specific mode to get a scaler output only and to get a scaler output if the signal output is scaler you need to set the parameter VariableName of the “To Workspace” block to “array.
Please refer to the following documentation for more information.
I hope it helps!  
Thanks.  

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by