About embedded function inside simulink

5 visualizaciones (últimos 30 días)
Kushal Badgujar
Kushal Badgujar el 20 de Jul. de 2012
I am stranger in simulink. Cp=5193 is just a number. 'Cp' is globally declared in Matlab embedded function.It is defined as signal in model explorer with datatype ->double, complexity-> real, dimension->2 In edit -> data port manager -> it is defined as parameter with size [1 1]
Error:
1.Expression 'Cp' for initial value of data 'Cp' (#61) must evaluate to a numeric or logical.
2.Error reported by S-function 'sf_sfun' in 'PBR_Temp_Xe/Embedded MATLAB Function/ SFunction ': Stateflow Suppress Error

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 20 de Jul. de 2012
Editada: Azzi Abdelmalek el 20 de Jul. de 2012
you can't déclare a global variable in embedded function . you have to pass it through inputs argument. for now a compiler don't allow globals variables
  2 comentarios
Kushal Badgujar
Kushal Badgujar el 23 de Jul. de 2012
Dear friend update your knowledge with following page http://www.mathworks.co.kr/help/toolbox/simulink/ug/bsds2rv.html
This problem is soved...
Azzi Abdelmalek
Azzi Abdelmalek el 23 de Jul. de 2012
thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by