필터 지우기
필터 지우기

Evaluate function real-time in Simulink

조회 수: 1 (최근 30일)
Gergely Hunyady
Gergely Hunyady 2019년 8월 27일
댓글: Gergely Hunyady 2019년 8월 28일
Hy,
I have the following function in Simulink, which i would like to evaluate for all X, Y values in real-time.
The inputs for X and Y are real time values, changing with sample time, PX and PY are column vectors, which i am searching the optimal point in, LAD is a constant value.
The function searches the point exactly as far from X, Y as the value of LAD and would give it back through GX and GY in real time, but shows me the following error:
The function ports are shown here:
How can I get this done?
Thank you for your help in advance.
Gergely Hunyady

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 8월 27일
Open the MATLAB function, click "Edit Data", specify the "size" of output GX and GY. Most common is the change from "-1" (inherient) to "1" (scalar).
  댓글 수: 1
Gergely Hunyady
Gergely Hunyady 2019년 8월 28일
Hy,
This should solve some problem, but even if the output is accepted, real-time calculation would not happen.
I will solve this with S-Functions, just need to understand how it works, for example NumDiscStates
Gergely Hunyady

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

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by