No appropriate method, property, or field 'MergedKeys' for class 'PollClass'.
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
xxxx1017
le 13 Mar 2019
Réponse apportée : Sheng Chen
le 13 Mar 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 commentaires
Réponse acceptée
Sheng Chen
le 13 Mar 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Toolbox Distribution dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!