Adaptive Control Law Design, s-function not working, please help
조회 수: 3 (최근 30일)
이전 댓글 표시
for the Adaptive Control Law Design,,the s-function implemented simulink file is attached,,but the chap1_1plot.m file giving error of Unrecognized function or variable 't'. kindly help,,how to rectify this problem
댓글 수: 2
Miguel Angel Mendieta Sarmiento
2022년 12월 14일
Hello, may you share the files? I have the book, but I need the example codes.
채택된 답변
추가 답변 (1개)
Sam Chak
2022년 12월 13일
Let us know if the following suggestions works.
Step 1: In all S-function Blocks, leave the field of the S-function parameter "empty", or else you can't run the Simulink file.
Step 2: In all To Workspace Blocks, the save format should be changed to "Array", or else you can't create the plots based on the code in "Chap1_1plot.m"
Step 3: Run the Simulation (mdl file). Then run "Chap1_1plot.m" file to plot the two figures.
Figure 1
Figure 2
댓글 수: 6
Sam Chak
2022년 12월 18일
편집: Sam Chak
2022년 12월 18일
My bad, I finally realized what happened. It's the setting in your Model Configuration Parameters. It exports all output signals as a single out object.
Step 2b: In the Model Config menu, select Data Import/Export, and the Uncheck "Single simulation output" should fix the issue.
참고 항목
카테고리
Help Center 및 File Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!