필터 지우기
필터 지우기

Conversion of MATLAB file to Simulink Block

조회 수: 110 (최근 30일)
JOB
JOB 2019년 6월 2일
댓글: Leila Farahani 2023년 6월 1일
Hi,
I am new to Simulink, but I do code in MATLAB a lot. How can I convert my *.m file to Simulink. When the main m file (script) is executed around 3 files are loaded and values are assigned to variables, one or two user defined functions are also called and output is assigned to a variable. Please let me know how this can be made into a Simulink block.

채택된 답변

Walter Roberson
Walter Roberson 2019년 6월 2일
There is no tool provided to convert .m into Simulink .
What you can do is use a MATLAB Function Block in simulink, and have that block call your code.
You will probably have to rewrite the code a bit. Anywhere that you have a call such as
result = outerFunction(InnerFunction(inputs))
you will typically need to rewrite that like,
temporary_result = zeros(expected_size_of_inner);
result = zeros(expected_size_of_outer);
temporary_result = InnerFunction(inputs);
result = outerFunction(temporary_result);
  댓글 수: 2
JOB
JOB 2019년 6월 3일
Thank You I will try it
Leila Farahani
Leila Farahani 2023년 6월 1일
I want to rub continuous wavelet transform in simulink function block, but i dont realy know how to write that, i try but i get some errors, is there any refrence to help me?

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

추가 답변 (1개)

Ouaddah Mohamed Amine
Ouaddah Mohamed Amine 2023년 5월 1일

Convert to matlab 2014

카테고리

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