No appropriate method, property, or field 'MergedKeys' for class 'PollClass'.
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
xxxx1017
el 13 de Mzo. de 2019
Respondida: Sheng Chen
el 13 de Mzo. de 2019
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
0 comentarios
Respuesta aceptada
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.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Toolbox Distribution en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!