Embedded MatLab Function Errors
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Darryl
le 20 Nov 2013
Réponse apportée : Azzi Abdelmalek
le 20 Nov 2013
I'm trying to simulate a very simple scenario. The model starts with a constant block that inputs 55 into an embedded function that simply adds the value 10 to the constant, then outputs it into a display block.
Here is the list from the console:
Warning: The model 'untitled' does not have continuous states, hence Simulink
is using the solver 'VariableStepDiscrete' instead of solver 'ode45'. You can
disable this diagnostic by explicitly specifying a discrete solver in the
solver tab of the Configuration Parameters dialog, or by setting the 'Automatic
solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the
Configuration Parameters dialog
Code Directory :
"/Users/dazgti/Documents/MATLAB/slprj/_sfprj/untitled/_self/sfun/src"
Machine (#56): "untitled" Target : "sfun"
Chart "MATLAB Function" (#58):
.
"c2_untitled.h"
"c2_untitled.c"
"untitled_sfun.h"
"untitled_sfun.c"
"untitled_sfun_debug_macros.h"
Interface and Support files:
"untitled_sfun_registry.c"
Code generation failed Attempt to execute SCRIPT union as a function:
/Users/dazgti/Documents/MATLAB/union.m
I have a script named union.m, but I have no idea why its trying to execute it.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153143/image.png)
function y = fcn(u)
%#codegen
x = u + 10;
y = x;
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 20 Nov 2013
In configuration parameters, just choose a discrete solver
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Configure Simulation Conditions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!