# OSX: Displaying matrices as images with &quot;Screen&quot;

**URL:** <https://psychtoolbox.discourse.group/t/osx-displaying-matrices-as-images-with-quot-screen-quot/1579>\
**Category:** Uncategorized\
**Created:** [November 8, 2005, 7:49pm UTC](https://psychtoolbox.discourse.group/t/osx-displaying-matrices-as-images-with-quot-screen-quot/1579 "2005-11-08T19:49:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [November 8, 2005, 7:49pm UTC](https://psychtoolbox.discourse.group/t/osx-displaying-matrices-as-images-with-quot-screen-quot/1579/1 "2005-11-08T19:49:15Z")

</div>

Dear Forum,  
  
please ignore my prior post - i figured out that the answer is on the page.   
but here is a \*real\* problem:  
  
i am running the new release of the p-toolbox on a g4 with mac os x.  
  
i am trying to display a NxMx3 matrix with screen.  
here is a snipplet of the code:  
  
  
try   
  
AssertOpenGL;  
  
gp==glassfun('concentric', 800, 100); %so that't the matrix to be displayed as image  
  
  
screens==Screen('Screens');  
  
screenNumber==max(screens);  
  
wpointer==Screen('OpenWindow',screenNumber, 0,[],32,2);  
  
% intuitively, this was my first try to display the matrix:  
Screen('PutImage', wpointer, gp);  
  
% but it didn't work. Just as:  
gptexture==Screen('MakeTexture', wpointer, gp);  
Screen('DrawTexture', wpointer, gptexture);  
  
WaitSecs(5);  
clear screen;  
  
catch   
 Screen('CloseAll');  
end   
  
I would be glad to know your opinion on this one. Spent the whole day on this!  
Please help!  
  
Thanks,  
  
-Fabian
