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?
0 个评论
采纳的回答
Pranjal Priyadarshi
2019-6-3
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!