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

19 Ansichten (letzte 30 Tage)
Kaisar
Kaisar am 16 Dez. 2023
Kommentiert: madhan ravi am 17 Dez. 2023
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'

Antworten (1)

madhan ravi
madhan ravi am 17 Dez. 2023
Bearbeitet: madhan ravi am 17 Dez. 2023
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 Kommentare
Kaisar
Kaisar am 17 Dez. 2023
plot(out.phi(:, 1), out.phi(:, 2))
I wrote it, but it gives error «unrecognized field name "phi"

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by