Matlab sample code

Legacy support with Phidget21
nemo

Matlab sample code

Postby nemo » Fri Apr 02, 2010 9:26 am

Do the sample codes available on this website work on MacOs?
I installed the driver for Matlab: Phidget_2.1.6.20100318.dmg
I also put the file phidget21Matlab.h from the sample codes to my working directory.
However, I get the error message:
??? Error using ==> loadlibrary at 461
There was an error loading the library "phidget21"
dlopen(phidget21.dylib, 1): image not found

Caused by:
Error using ==> loaddefinedlibrary
dlopen(phidget21.dylib, 1): image not found

theTroll527

Re: Matlab sample code

Postby theTroll527 » Fri Apr 02, 2010 10:19 am

Here is a suggestion: I am not sure what the path is to the lib so I will use LIBPATH to designate the path, put the appropriate path in for your Matlab install.

If bash is your shell you can add the path to ~/.bash_profile.

For example, to add the path /usr/local/LIBPATH

In terminal create/edit ~/.bash_profile
Add the following line: PATH=$PATH:/usr/local/LIBPATH; export PATH
Save the file
Type: source ~/.bash_profile (to get the shell to read the file without closing/restarting terminal)

Note: ~/.bash_profile sets for current user (only)

Now in theory that should fix the problem because the lib directory path will be added to the user profile.


theTroll


Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 1 guest