Why do I get the error «unrecognized function or variable»

19 次查看(过去 30 天)
Simulink: ramp->trs fnc->scope. Scope: Data history -> ✅Save data to workspace -> Variable name: phi -> Format: Array. Command window: figure(1); subplot(2, 1, 1); plot(phi(:,1),phi(:,2)); unrecognized function or variable 'phi'

回答(1 个)

madhan ravi
madhan ravi 2023-12-17
编辑:madhan ravi 2023-12-17
Usually you need to use dot indexing to get the variable data.
plot(out.phi(:, 1), out.phi(:, 2))
Use To Workspace block Save format to Array
  3 个评论
Kaisar
Kaisar 2023-12-17
plot(out.phi(:, 1), out.phi(:, 2))
I wrote it, but it gives error «unrecognized field name "phi"

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by