Page 1 of 1

Problem loading .h library into MATLAB

Posted: Tue Feb 07, 2017 11:27 am
by gre0012017

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!!

%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'

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/', 'phidget21Matlab.h', 'alias', 'phidget21');


>> loadphidget21
Error using libisloaded
Library name must be a string.

Error in loadphidget21 (line 13)
[notfound,warnings]=libisloaded('phidget21.lib', 'phidget21Matlab_Windows_x64.h');

Re: Problem loading .h library into MATLAB

Posted: Mon Dec 04, 2017 11:41 am
by the_trent42

I am having the same problem. I was wondering if you had figured out the solution to this. I cant seem to get this lib downloaded.

Re: Problem loading .h library into MATLAB

Posted: Mon Dec 04, 2017 3:37 pm
by mparadis
Judging by the error message, the problem isn't with Phidgets libraries but with the "libisloaded" Matlab function. Does libisloaded work for your other Matlab libraries?