libpointer
📝 Syntaxe
📥 Argument d'entrée
📤 Argument de sortie
📄 Description
💡 Exemples
🔗 Voir aussi
🕔 Historique
Version
📄 Description
Last updated
Last updated
p = libpointer('int8Ptr', int8([3 4]));
p.isNull()
p.DataType
p.ValueNLSDYNAMIC_LINK_IMPEXP double *multiplicationDoubleByReference(double *x)
{
*x *= 2;
return x;
}x = 133.3;
xPtr = libpointer('doublePtr', x);
path_ref = modulepath('dynamic_link', 'builtin');
lib = dlopen(path_ref);
f = dlsym(lib, 'multiplicationDoubleByReference', 'libpointer', {'doublePtr'});
[r1, r2] = dlcall(f, xPtr);
r2
% r1 is an libpointer of type '' (voidPointer) and it need to be change type and size.
r1.setdatatype('doublePtr');
r1.reshape(1, 1);
get(r1)