Hello,
I have the PhidgetBridge 4-Input, and I am trying to run the loadphidget21.m file in MATLAB, using the code that was given here online. I am receiving the following errors any time I try to run it, however, I have moved all of the phidget libraries into MATLAB library, so I am not sure why it is not working. I hope someone has run into the same problem so they can shed some light on this topic as well. Thank yoU!!
----MATLAB CODE----
%loadphidget21.m - Loads the phidget21 library, paying attention to OS,
%suppressing warnings.
function loadphidget21
if not(libisloaded('phidget21'))
warning off MATLAB:loadlibrary:TypeNotFound
warning off MATLAB:loadlibrary:TypeNotFoundForStructure
switch computer
case 'PCWIN'
[notfound,warnings]=libisloaded('phidget21.lib','phidget21Matlab_Windows_x64.h');
case 'PCWIN64'
[notfound,warnings]=libisloaded('phidget21.lib', 'phidget21Matlab_Windows_x64.h');
%case 'MAC'
%case 'MACI'
%case 'MACI64'
% [notfound,warnings]=loadlibrary('/Library/frameworks/Phidget21.framework/Versions/Current/Phidget21', 'phidget21Matlab.h', 'alias', 'phidget21');
%case 'GLNX86'
%case 'GLNXA64'
%[notfound,warnings]=loadlibrary('/usr/lib/libphidget21.so', 'phidget21Matlab.h', 'alias', 'phidget21');
end
end
end
---MATLAB ERRORS----
>> loadphidget21
Error using libisloaded
Library name must be a string.
Error in loadphidget21 (line 13)
[notfound,warnings]=libisloaded('phidget21.lib', 'phidget21Matlab_Windows_x64.h');