stimulus presentation

Hi everyone, please can someone assist me. I want to write a code that will allow the stimuli to be presented in sequence (one after the other). Firstly, at the same location, and secondly on a different locations on the screen. The display interval for each object is 200ms.
Thanks in advance for your kind support.
Tom

 採用された回答

Paulo Silva
Paulo Silva 2011 年 8 月 2 日

0 投票

1 件のコメント

Tom Fredrick
Tom Fredrick 2011 年 8 月 2 日
Thanks Paulo. I'll take a look at your reference shortly.

サインインしてコメントする。

その他の回答 (2 件)

Sean de Wolski
Sean de Wolski 2011 年 8 月 2 日

0 投票

Sounds like you want a while/for loop with a pause
doc while
doc for
doc pause
or a timer function.
doc timer
I don't know what you mean by "present stimuli" so you'll have to describe it in significantly more detail. Probably you want to show something then get rid of it after 200ms?
E.g. EDITTED again
%Store some images %get all pictures ahead of time
imgs = cell(5,1);
imgs{1} = imread('pout.tif');
imgs{2} = imread('cameraman.tif');
imgs{3} = imread('football.jpg');
imgs{4} = imread('coins.png');
imgs{5} = imread('peppers.png');
figure;
axis ij
for ii = 1:length(imgs)
H = imshow(imgs{ii});
pause(.2)
delete(H)
end

6 件のコメント

Tom Fredrick
Tom Fredrick 2011 年 8 月 2 日
Thanks Sean. What I want to do actually is to present say 5 different objects at the same location but in sequence. Alternatively, I can present them simultaneously, for e.g., object 1 at location A, object 2 at location C, object 5 at location B, and so on. However, I want to present all these 5 objects at the same location on the screen which might be A,B,C,or D but in sequence(one after another).The flip interval on each display is 200ms. I guess the code has to take into account screen refreshes and time.
Hope I'm detailed enough.
Thanks.
Sean de Wolski
Sean de Wolski 2011 年 8 月 2 日
okay. What are the objects, are they small images? Are they points? Above I go through a few different colored points at 200ms intervals (not accounting for display time).
Tom Fredrick
Tom Fredrick 2011 年 8 月 2 日
Thanks Sean. The objects are faces.
Sean de Wolski
Sean de Wolski 2011 年 8 月 2 日
so do the exact same thing I have above but show a face instead.
see edit.
Tom Fredrick
Tom Fredrick 2011 年 8 月 2 日
Thanks again Sean. Will try it out straight away.
Bruno Sousa
Bruno Sousa 2012 年 6 月 22 日
Thanks Sean, I didn't need exactly what you wrote here, but it was very useful to gave me an ideia to solve a problem!

サインインしてコメントする。

Daniel Shub
Daniel Shub 2011 年 8 月 2 日

0 投票

If you really want 200ms and want to take into account screen refreshes, then you cannot do it easily in MATLAB. People have written packages to do this. I would suggest either MGL http://gru.brain.riken.jp/doku.php/mgl/overview or Psychtoolbox http://psychtoolbox.org/wikka.php?wakka=HomePage.
If you are okay with a few screen refreshes of jitter (i.e., +/- 20ms) then you can do it how Sean suggests with timers, while, for pause, etc.

1 件のコメント

Tom Fredrick
Tom Fredrick 2011 年 8 月 2 日
Thanks Daniel for your suggestion.

サインインしてコメントする。

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by