how to change datatype of libpointer
Ältere Kommentare anzeigen
Hi , I am trying to use Matlab and shared library.
If I have a C function which is like below
void * foo(int n);
It's just like that we get a void type pointer containing n int data , returned from foo .
In C , we can change void type to int or double easily.
But how to change type in Matlab ?
I tried
pointer = calllib(lib,'foo',1000);
pointer.datatype = 'uint16Ptr'; %Changing the 'DataType' property of lib.pointer is not allowed.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Call C from MATLAB finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!