Array of user defined types with external libraries
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Thor Andreas
le 18 Déc 2012
0 votes
Catégories
En savoir plus sur Call C from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!