Filter löschen
Filter löschen

How can I implement recursive function in simulink model ?

2 Ansichten (letzte 30 Tage)
VAMSI KRISHNA THANIKANTI
VAMSI KRISHNA THANIKANTI am 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;
}

Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by