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.

3 ビュー (過去 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 Center および File ExchangeConfigure and View Diagnostics についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by