Address operator on arrays in stateflow

조회 수: 5 (최근 30일)
Will He
Will He 2023년 11월 27일
답변: Benjamin Thompson 2024년 1월 21일
When I'm using c functions in stateflow. I get an error, it says"Address operator on arrays is limited to indexed array elements, e.g. &arrayVar[index]" and can't know how to solve the problem.
My C code is a function like this "void test(unsigned char* a, unsigned char* b, unsigned char* c);", and I integrated it into stateflow as"test(&data_a,&data_b,&data_c);", where data_a/data_b/data_c are 1-D arrays.
I know I can use address operator for structures in C code, but can I use this operator to arrays or matrix?
Thank you.

답변 (1개)

Benjamin Thompson
Benjamin Thompson 2024년 1월 21일
Can you try using &data_a[0], &data{b[0], and &data_c[0]?

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by