How to design Swap logic with Simulink blocks to get the same code with Embedded coder?

1 次查看(过去 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?

采纳的回答

Pranjal Priyadarshi
You can always use MATLAB function block to design the swap logic.You only need to write the swap logic in the function block. For more information on this you can use the following documentation:

更多回答(0 个)

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by