Effacer les filtres
Effacer les filtres

How can I implement recursive function in simulink model ?

2 vues (au cours des 30 derniers jours)
VAMSI KRISHNA THANIKANTI
VAMSI KRISHNA THANIKANTI le 31 Mai 2018
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;
}

Réponses (0)

Catégories

En savoir plus sur Modeling 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!

Translated by