Array of user defined types with external libraries
Show older comments
Hi
I have a struct defined in my external c-library, e.g. :
struct MyStruct
{
char a;
short b;
}
Then I want to pass an array of these structs to my function
function myFunction1(struct MyStruct* str,int sz)
{
int kk;
for(kk=0;kk<sz;kk++)
{
str[kk].a = 1;
...
}
}
How can I do this using libpointer and libstruct? Can one only use arrays of basix types?
Thank you for any help! Thor Andreas
Accepted Answer
More Answers (1)
Thor Andreas
on 18 Dec 2012
0 votes
Categories
Find more on Call C from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!