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

조회 수: 9 (최근 30일)
Kaisar
Kaisar 2023년 12월 16일
댓글: madhan ravi 2023년 12월 17일
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에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by