How can I implement recursive function in simulink model ?

2 次查看(过去 30 天)
Hi Good morning to all. here i need to use the shown recursive function in my simulink model so that i need to generate code from entire controller. i am failing to design this recursive function in model. can any one suggest me how to do ? I am also fine to use chat (state flow) ? ********************************************************************************************************************
static UINT16 DeadBandChkModule(UINT16 Frequency, UINT16 Delta_Freq)
{ if ((Frequency == (UINT16)Get(eDEADBAND_FREQUENCY1))||(Frequency == (UINT16)Get(eDEADBAND_FREQUENCY2))||(Frequency == (UINT16)Get(eDEADBAND_FREQUENCY3)))
{ Frequency = (UINT16)Frequency + (UINT16)Delta_Freq;
Frequency = (UINT16)DeadBandChkModule(Frequency,Delta_Freq);
return Frequency;
}
else
return Frequency;
}

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by