Calling C Function from Matlab using calllib

1 view (last 30 days)
Scott
Scott on 25 Jun 2015
Edited: Walter Roberson on 25 Jun 2015
C Function:
function_tobe_called(const char(*z)[16], unsigned short x, unsigned int y);
MATLAB code:
z = 'monkey'
x = 1;
y = 17;
output = calllib('libname','function_tobe_called',z, x, y)
I think I have to pass z in at a pointer but I don't know how to address the char(*z [16]) in my matlab code.
Thanks

Answers (0)

Categories

Find more on Interactive Control and Callbacks 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!