Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

MATLAB Programming/Psychtoolbox/expanding rectangle.m

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

% expanding_rectangle.m % % draws an expanding rectangle on the screen % % Revision History: % RobKohr - April 7, 2005 - First draft %This requires two scripts: ptb_ind_screen_setup.m and ptb_ind_flip.m clear all; %set the screen up. This should be used at the after clear all ptb_ind_screen_setup; shape_rect = window_rect/2; tic while( (shape_rect(3)< ... window_rect(3)) & ... (shape_rect(4)< ... window_rect(4))... ) if(toc>10) break; end %expand the size of the shape shape_rect = shape_rect*1.01; %draw shape offscreen Screen(window, 'FillRect', [255, 0, 0], shape_rect); %flip copys what you have drawn to the screen ptb_ind_flip; end clear screen;