Trevor Dubois
unread,Feb 27, 2015, 7:48:34 PM2/27/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi all,
I am learning to use Matlab and have stumbled upon a problem that I cannot find information about online.
I installed the extension Psychtoolbox and I tried to run a program using this tool box but there is an error that seems to relate to it.
Error:
Undefined function 'SetupToolBox' for input arguments of type 'double'.
Error in ImageryExp1 (line 10)
[w, ScreenRect,Width,Height] = SetupToolBox(1/2,0,128);
Script:
clc;
clear all;
close all;
ListenChar(2);
TxtSize=35;
[w, ScreenRect,Width,Height] = SetupToolBox(1/2,0,128);
%the colour will be grey and this command starts up PTB
%monitor will be on default screen mode shown by the 0
%the screen size will be either full of part of the full screen size
%determined by the 1/2 numbers
Screen('TextFont',w, 'Times New Roman'); %Chooses Times New Roman Font
Screen('TextStyle', w, 2); %Chooses bold text which is represented by 3
Screen('TextSize',w, TxtSize);
%Collect demographic data from participants using psychtoolbox
S_data{1} = GetEchoString(w, 'Please write down your name.', 10,0, [255 0 0], [128 128 128]);
S_data{2} = str2num(GetEchoString(w, 'Please write down your age.', 10, 2*TxtSize, [255 0 0], [128 128 128]));
S_data{3} = GetEchoString(w, 'Please write down whether your gender is M/F.', 10, 3*TxtSize, [255 0 0], [128 128 128]);
S_data{4} = str2num(GetEchoString(w, 'Please write down your participant number', 10, 5*TxtSize, [255 0 0], [128 128 128]));
%information telling participant to continue
DrawFormattedText(w, 'Please press the spacebar in order to continue on to the next page', 'center', round(Height*0.9), [0 0 225]);
Screen('The information will not be flipped', w); % the information will now be displayed on the screen
[KeyIsDown, ~, KeyCode] = KbCheck; %this does a KbCheck to make sure no keys etc are pressed down
while -strcmp(KbName(KeyCode), 'space') %Force spacebar press
[KeyIsDown, ~, KeyCode] = KbCheck;
end
KbReleaseWait; %waits until all keys are released
WaitSecs(1);
------------------------------------------
It seems to me that I did not properly install Psychtoolbox but I have spent several hours reading, rereading and installing then reinstalling many aspects of this software and I cannot seem to find a solution of how to make it work.
Thus a starting step is can I check whether it is installed correctly with a command? And secondly if it is not what can I do to fix this?
All the best,
Trevor