Calling C Function from Matlab using calllib

1 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by