- Create a Simulink function with input and output arguments
- Right click the block and navigate to C/C++ code --> C/C++ Function Interface
- Configure C/C++ Return Argument to Void, which modifies all the output arguments defined in simulink function to pointer
Use pointers in simulink
조회 수: 105 (최근 30일)
이전 댓글 표시
Hello,
I would like to model on Simulink the code in C below, but as you see a pointer is used, this function modifies the value of the memory address, how can I model that, knowing that behind the goal is to regenerate a code using embedded coding?
thanks
void ModifyValue(uint16 Arg1, uint16 *Arg2)
{
{
*Arg2= 5;
}
return (void);
}
댓글 수: 0
답변 (1개)
Muthukumar Ganesan
2022년 8월 20일
Hi,
You can perform this using following method.
Thanks.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!