how to design swap logic with simulink blocks ?

1 Ansicht (letzte 30 Tage)
Sasidhar Duggireddy
Sasidhar Duggireddy am 22 Mai 2019
Beantwortet: Renato SL am 28 Mai 2019
can any one tell me how to design below swap logic with simulink blocks, to get same code with embedded coder.
void Swap(int *p,int *q)
{
temp = *p;
*p = *q;
*q = temp;
}
is there any possibulity to get the code same like above with embedded coder?

Antworten (1)

Renato SL
Renato SL am 28 Mai 2019
Take a look at the MATLAB Function block (https://www.mathworks.com/help/simulink/slref/matlabfunction.html)

Kategorien

Mehr zu Simulink 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