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?
0 个评论
回答(1 个)
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
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 Exchange 中查找有关 Configure and View Diagnostics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!