필터 지우기
필터 지우기

Function 'ss' implicitly resolved in the MATLAB workspace. Implicit evaluation in MATLAB is not supported. Please declare this function extrinsic using eml.extrinsic('ss'), or call it using feval.

조회 수: 1 (최근 30일)
When I use my matlab code in embedded matlab function block in simulink it shows the following error
"Function 'ss' implicitly resolved in the MATLAB workspace. Implicit evaluation in MATLAB is not supported. Please declare this function extrinsic using eml.extrinsic('ss'), or call it using feval.
Function 'Embedded MATLAB Function' (#43.1890.1907), line 104, column 12: "ss(Ae, Be, He, D)" Launch diagnostic report."
How can I solve it?

답변 (1개)

C.J. Harris
C.J. Harris 2013년 5월 20일
What this error message is saying is that in order to use the state space function (ss) Simulink has to call the MATLAB workspace. As the error message states you can get around this by declaring the function extrinsic, for example:
function y = fcn(u)
eml.extrinsic('ss')
% Code here
y = u;
The main restriction this will have (in addition to the computational time) is you will no longer be able to generate code (C/C++) from the Simulink model using Real-Time Workshop due to the dependencies on core MATLAB functionality.
A better solution would be to use the state space blocks provided as part of the standard Simulink library (Simulink/Continuous or Simulink/Discrete) to construct your state space model.
  댓글 수: 1
Syed Ahmad Nadeem
Syed Ahmad Nadeem 2020년 6월 11일
Hi,
I am using a state space model that is linearized for a non-linear model and the equilibrium points are not specific but are determined from other (continuously changing) dynamics of the model. Hence, I am trying to form a state space model and discretize it within embedded matlab function using 'ss' and 'c2d' functions. But, I am notified with an error - "Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs." I am using simulink 2018a. Is there a way to solve this problem? Any work around will also be appreciated.
Thank you!

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

카테고리

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