draw a grating stimulus with multiple orientations through psychtoolbox
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anwesha
am 27 Dez. 2017
Kommentiert: Anwesha
am 5 Jan. 2018
I am trying to draw a grating stimulus in psychtoolbox with multiple orientations randomly (in drift demo, am modifying the code). I have the array with the orientations in random order but when i run it, it does it all at once. what functions should i use so that the grating runs runs with multiple orientations with a waiting time of 1 sec in between the orientations.
this is what i have now:
angle= [0,pi/4,pi/2,3*pi/4, pi, 5*pi/4, 3*pi/2, 7*pi/4];
D = rad2deg(angle);
pause('on')
for i=1:numFrames
phase=(i/numFrames)*2*pi;
% grating
[x,y]=meshgrid(-300:300,-300:300);
% angle=30*pi/180; % 30 deg orientation.
msize = numel(angle);
or= D(randperm(msize, 1))
f=0.09*2*pi; % cycles/pixel
a=cos(or)*f;
b=sin(or)*f;
m=exp(-((x/90).^2)-((y/90).^2)).*sin(a(:,1).*x+b(:,1).*y+phase)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 27 Dez. 2017
pause(1)
9 Kommentare
Walter Roberson
am 5 Jan. 2018
Not from me. I recently got a new computer and have not set up Psychtoolbox on it as doing so is a bit of a nuisance to tie into the retrace properly. It is not a program that I use myself, just something I have encountered enough times over the years to sometimes be able to answer minor questions about.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Video capture and display finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!