how to design swap logic with simulink blocks ?

조회 수: 3 (최근 30일)
Sasidhar Duggireddy
Sasidhar Duggireddy 2019년 5월 22일
답변: Renato SL 2019년 5월 28일
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?

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by