No appropriate method, property, or field 'MergedKeys' for class 'PollClass'.

9 visualizaciones (últimos 30 días)
Hi guys,
I have been trying to work on the Matlab script I have wrote to measure the RT for the task.
However, the Matlab program returns back to the screen with the following message after the first stimulus has presented (I have two stimuli to be presented, the first stimulus always appears before the onset of the second stimulus. Whar's more is response key for the first stimulus needs to be pressed before the onset of the second stimulus).
No appropriate method, property, or field 'MergedKeys' for class 'PollClass'.
More scripts are shown below:
myKbd = PollClass(0.005);
myKbd.Reset; % Time0 is set here.
Times = myKbd.Times - myKbd.Time0;
NResps = myKbd.NKeys;
if NResps==1
RT1 = myKbd.Times(1);
Resp1 = myKbd.MergedKeys;
else
RT1 = ExpInfo.NogoRT;
Resp1 = {ExpInfo.HomeKey};
end

Respuesta aceptada

Sheng Chen
Sheng Chen el 13 de Mzo. de 2019
That error message means in class 'PollClass', there is no property called 'MergedKeys'
You can use isprop to check if there is such property by using the following function
tf = isprop(myKbd,'MergedKeys')
which returns true if 'MergedKeys' is a property of 'PollClass'
Or you can use
tf = ismethod(myKbd,'MergedKeys')
to check if 'MergedKeys' is a method of 'PollClass' or not.

Más respuestas (0)

Categorías

Más información sobre Toolbox Distribution en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by