Invalid MEX-file error

Hello, I am new to Matlab and recently downloaded PTB to run a script for a behavioral task. I am getting teh following error when I run the task:


 Invalid MEX-file 'C:\toolbox\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw64': The specified module could not be found.


Error in getKeyboardNumber (line 4)

d=PsychHID('Devices');

 

I can see the file, but it is apparently not functioning. I tried updating PsychToolbox and I even downloaded a new version of  PsychHID.mexw64 from the PTB site, but that is not working. 


Does anyone have any suggestions? 


Thanks

Hello
"I am new to Matlab and recently downloaded PTB", ditto. Yes you already have the Matlab-EXecutive file, I guess, yet the location of this mex file is not right and you should copy-paste it to the suitable path you already mentioned in order to have it execute commands in matlab.

On Wed, May 18, 2016 at 10:53 PM, colleenc1686@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:

Hello, I am new to Matlab and recently downloaded PTB to run a script for a behavioral task. I am getting teh following error when I run the task:


Invalid MEX-file 'C:\toolbox\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw64': The specified module could not be found.


Error in getKeyboardNumber (line 4)

d=PsychHID('Devices');

I can see the file, but it is apparently not functioning. I tried updating PsychToolbox and I even downloaded a new version of PsychHID.mexw64 from the PTB site, but that is not working.


Does anyone have any suggestions?


Thanks


XX---In PSYCHTOOLBOX@yahoogroups.com, <colleenc1686@...> wrote :

Hello, I am new to Matlab and recently downloaded PTB to run a script for a behavioral task. I am getting teh following error when I run the task:


 Invalid MEX-file 'C:\toolbox\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw64': The specified module could not be found.


Error in getKeyboardNumber (line 4)

d=PsychHID('Devices');

 

I can see the file, but it is apparently not functioning. I tried updating PsychToolbox and I even downloaded a new version of  PsychHID.mexw64 from the PTB site, but that is not working. 


Does anyone have any suggestions? 


-> Has been answered often on this forum, searching helps.


-> LoadPsychHID before first use of PsychHID helps on MS-Windows.


-> Your script is probably coming originally from OSX and written in a non-portable fashion, so fixing this might just lead to the next failure.


I don't know if that getKeyboardNumber function just gets the index of the keyboard, but GetKeyboardIndices is the PTB function dedicated to doing that job in a portable fashion. "help GetKeyboardIndices".


Also on MS-Windows, as opposed to Linux or OSX, there isn't any way to treat different keyboards differently, so if that script somehow requires use of different keyboards (e.g., experimenter vs. subject) you will be a bit out of luck.


best,

-mario






Thanks