Unrecognized function or variable 'scope'. error in matlab script

I run a simulink file that tunes pid controllers to obtain their optimal gains.
The simulation will go on for 20 seconds and I need to extract the time in variable "tout" which is taken from "Tmodel"
the following lines are responsible for my task:
set_param('AGC_2_Simulink_RLC1_10may25c','Solver','ODE113')
sim('AGC_2_Simulink_RLC1_10may25c', Tmodel);
tout = scope(:,1);
but I get this error: "Unrecognized function or variable 'scope'." for the last line.
Kindly I need help

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2025년 5월 10일

답변:

2025년 5월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by