how to design swap logic with simulink blocks ?

2 次查看(过去 30 天)
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 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by