covert matlab program to simulink block

조회 수: 1 (최근 30일)
shiksha
shiksha 2014년 2월 18일
답변: Muruganandham Subramanian 2014년 2월 21일
hi all, i am constructing a feedback loop in simulink . the loop contains certain matlab programs. i want to know whether i can implement the matlab code or the executable file in simulink block so that it executes in simulink.
thanks in advance.
with regards, shiksha
  댓글 수: 1
shiksha
shiksha 2014년 2월 19일
Hi all, Thanks for the reply. I actually want to do some image processing(SIFT) in the block to get some variables. So it requires a group of programs not just one program or function. So is there any way to do it?
regards, shiksha

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

채택된 답변

Anuj
Anuj 2014년 2월 18일
You can use MATLAB Function. Go through this- MATLAB Function

추가 답변 (2개)

Mischa Kim
Mischa Kim 2014년 2월 18일
Shiksha, yes, provided I correctly understand your question.
You can include MATLAB functions in Simulink models (e.g., by using a MATLAB function block from the library [User-Defined Functions]). When you run the Simulink model the model-embedded MATLAB functions are automatically executed.
Does this answer your question?
  댓글 수: 2
shiksha
shiksha 2014년 2월 19일
Hi mischa, Thanks for the reply. I actually want to do some image processing(SIFT) in the block to get some variables. So it requires a group of programs not just one program or function. So is there any way to do it?
regards, shiksha
Mischa Kim
Mischa Kim 2014년 2월 20일
Absolutely. You can have multiple MATLAB functions inside a Simulink model, simply drag the MATLAB function block from the Library as many times as you need, or, copy-paste the block inside the model.
You can also call MATLAB functions (say, e.g., from one of these functions blocks) that are not part of the Simulink model.

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


Muruganandham Subramanian
Muruganandham Subramanian 2014년 2월 21일
Try using 's-function' block (Level-1).

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by