필터 지우기
필터 지우기

Hi how to insert .m file into .slx file ? Please help me with clear explaination

조회 수: 14 (최근 30일)
I have a sample_1000kW.m file and I have to insert this in sample_1000kW.slx file both are in same location.
  댓글 수: 1
Samhita
Samhita 2018년 5월 13일
Thanks for understanding my problem Walter, your explanation is very short, detail explanation is appreciated. I was able to create MATLAB function block but I couldn't call that file in Simulink.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 29일
You cannot do that directly.
Rename the sample_1000kW.m and function to a name that does not match the name of your model, because invoking a model has a higher priority than calling a .m of the same name.
Then create a MATLAB Function Block, and have that MATLAB Function Block call your function.
  댓글 수: 2
Samhita
Samhita 2018년 5월 2일
Thanks for understanding my problem, your explanation is very short so please explain in clear that how to create MATLAB function and then how to call that function in Simulink file.
Walter Roberson
Walter Roberson 2018년 5월 13일
To call a MATLAB Function Block in Simulink, connect it to an input source and to an output. Then run the model.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by