필터 지우기
필터 지우기

Global variables in embedded Matlab function

조회 수: 1 (최근 30일)
Mitch Martelli
Mitch Martelli 2013년 3월 20일
Hi @ all,
I would like to use some variables defined in a m-file into embedded Matlab block in Simulink. I would like to do this without define again the variables names and values.
Someone knows if it possible to use some global variables defined in the Matlab workspace in the embedded Matlab block in Simulink?
There is an alternative method to do what I want?
Thanks in advance
Mitch

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 20일
You can pass your constant through a constant block,
  댓글 수: 3
Mitch Martelli
Mitch Martelli 2013년 3월 21일
Thanks Azzi and Guy,
@ Azzi I already use constant block but when there are a lot of parameters is not confortable.
@ Guy Your help was very usefull. How can I accpet your answer?
Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 21일
I've always used constant block as input argument for Matlab function block and it worked fine. But I 've also thought that there is a better way to do it, Guy 's answer is really what I was looking for. Thanks Guy

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

카테고리

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