SIMULINK: Import Variables from Workspace

14 ビュー (過去 30 日間)
Tiberia Todeila
Tiberia Todeila 2021 年 3 月 17 日
回答済み: Fangjun Jiang 2021 年 3 月 17 日
var.time = [(1:1:166)'];
var.signals.temp = [(-40:1:125)'];
var.signals.vbe = [(100:1:265)'];
plot (var.signals.temp, var.signals.vbe)
Can I plot this struct in SIMULINK without having a time serie? The idea of the plot is to have a temp-voltage plot like in the following plot generated from MATLAB.
The SIMULINK setup was made with From Workspace block. Is it possible to change the axis of the XY-Graph in SIMULINK?

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 3 月 17 日
The "From Workspace" data in Simulink needs to have a time. If you set the two "From Workspace" block data like this, you will be able to get the figure in "XY Graph" in Simulink.
[var.time, var.signals.temp]
[var.time, var.signals.vbe]

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by