My code:
Screen('OpenWindow', 0, [0 0 0], [0 0 600 600])
Screen('FillRect', win, [0 255 0 ], [0 0 50 50]);
Screen('Flip', win);
I understand that the documented line is:
Screen('FillRect', windowPtr [,color] [,rect] )
With windowPtr
as just a placeholder which needs to be replaced with a variable name to identify this particular shape. However when I'm using win to identify it, I am constantly getting the error:
Undefined function or variable 'win'.
Error in Practice_Script_1 (line 17)
Screen('FillRect', win, [0 255 0 ], [0 0 50 50]);
I don't understand what I'm doing wrong and it's probably just some noob mistake that is really frustrating me.