Yes, imshow is part of the image toolbox. Here's a simple alternative:
image(round(sq*255)); colormap(gray(256)); axis equal; axis off;
This will show something reasonable, but will not scale the figure to
show actual pixels. The code to do that robustly is surprisingly
complex. But here is a quick hack that will probably work:
set(gca, 'Units', 'pixels');
set(gcf, 'Units', 'pixels');
figPos = get(gcf, 'Position');
set(gcf, 'Position', [figPos(1:2) size(sq)+40]);
set(gca, 'Position', [20 20 size(sq)]);
cheers,
bob
Allen W. Ingling wrote:
-=-=-=-=-=-=-=-=-=- http://www.stanford.edu/~bobd -=-=-=-=-=-=-=-=-=-
Bob Dougherty bobd@... 474 Jordan Hall
Research Scientist (650) 725-0051 (voice) Stanford University
Psychology (650) 723-0993 (fax) Stanford, CA 94305-2130
image(round(sq*255)); colormap(gray(256)); axis equal; axis off;
This will show something reasonable, but will not scale the figure to
show actual pixels. The code to do that robustly is surprisingly
complex. But here is a quick hack that will probably work:
set(gca, 'Units', 'pixels');
set(gcf, 'Units', 'pixels');
figPos = get(gcf, 'Position');
set(gcf, 'Position', [figPos(1:2) size(sq)+40]);
set(gca, 'Position', [20 20 size(sq)]);
cheers,
bob
Allen W. Ingling wrote:
>--
> Andrew Derrington wrote:
>
>
>>I haven't used Psychtoolbox before, and I thought I'd try your
>>filtering programme to get me started, but maybe I'm missing
>>something.
>>
>>imshow(sq) throws up an error on my machine. Where is imshow?
>>
>
> ยป which imshow
> C:\matlabR12\toolbox\images\images\imshow.m
>
> It might be part of the Matlab image toolbox, which is an add-on package to
> Matlab.
>
> --Allen
>
-=-=-=-=-=-=-=-=-=- http://www.stanford.edu/~bobd -=-=-=-=-=-=-=-=-=-
Bob Dougherty bobd@... 474 Jordan Hall
Research Scientist (650) 725-0051 (voice) Stanford University
Psychology (650) 723-0993 (fax) Stanford, CA 94305-2130