matlab script to simulink model

조회 수: 1 (최근 30일)
zahid fazal
zahid fazal 2020년 12월 12일
답변: Divyanshu 2024년 7월 30일
I know that, by user defined function we can creat a simulink block for my m-code..But i am unable to plot my m-code plots by using scope bloks of simulink. HOW to do it??
  댓글 수: 1
Kenneth
Kenneth 2024년 7월 29일
I believe you could use plot() functions in simulink function blocks, which should generate plots when run.

댓글을 달려면 로그인하십시오.

답변 (1개)

Divyanshu
Divyanshu 2024년 7월 30일
Hi Zahid,
If you want to visualize plots of your m-code on scope block than you can use MATLAB-Function block.
Instead of using plot() function inside the m-script file you can use the script for computation and return the results as output which can be passed to scope block.
You can refer the following documentation link for more details on 'MATLAB Function' block:

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by