From: Jeff on
Hi, it seems that pcolor is not working on my PC. But only on my PC.

I have some code that our professor gave us to simulate some cellular automata - whatever that is. pcolor is supposed to accept an array of 1s and 0s and color a figure based on the array. For every cell with a 1, it makes that pixel black; the other pixels remain white.

The program works on 2 different machines for him, but not on my PC (using Win Vista). I can see that the input array is correctly populated, but Figure 1 is just plain white on my PC.

What could be different about my PC, or my Matlab settings that would render pcolor impotent?

Thanks,
-Jeff

My code is probably too long for this forum, but here it is, anyway:

% One Dimensional Cellular Automata
% plot using pcolor() as 2D array where vertical direction is time

n=100; % size of the CA
t=101; % how many timesteps
k=2;
m=1;

a=zeros(t,n);
iv=0;

while iv<m,
rc=round(rand(1)*n)+1;
if a(1,rc) ==0
a(1,rc)=1;
iv=iv+1;
end
end

for s=2:t-1,

for c=1:n,
cm=c-1;
cp=c+1;
if cm<1
cm=n;
end
if cp>n
cp=1;
end
a(s,c)=mod(a(s-1,cm)+a(s-1,cp),k);
end

pcolor(a);
hold on;
drawnow;

end
From: Jeff on
OK, it seems like I'm having some kind of graphics issue.

When I run the program, Figure 1 is the all white window I described. But if I select Edit - Copy Figure, it seems to highlight everything and then display the figure the way it should. Also, when I click on menu choices in the Figure1 window, they never go away (I can't select any of the options, but the menu is still displayed in the figure).

So this is some type of display issue. How can I fix this?

Thanks,
-Jeff
From: Jan Simon on
Dear Jeff!

> So this is some type of display issue. How can I fix this?

Do you have the newest drivers for your graphics card?
Did you (buy and) install the newest Matlab?

Good luck - it sounds not trivial :-( Jan
From: Adam Pilchak on
help pcolor

try changing from the default 'faceted' to 'interp'
It's helped me in the past when having display issues.


"Jeff " <spREMOVEHITSjeffAT(a)SIGNoptonline.net> wrote in message <hjcret$2fi$1(a)fred.mathworks.com>...
> Hi, it seems that pcolor is not working on my PC. But only on my PC.
>
> I have some code that our professor gave us to simulate some cellular automata - whatever that is. pcolor is supposed to accept an array of 1s and 0s and color a figure based on the array. For every cell with a 1, it makes that pixel black; the other pixels remain white.
>
> The program works on 2 different machines for him, but not on my PC (using Win Vista). I can see that the input array is correctly populated, but Figure 1 is just plain white on my PC.
>
> What could be different about my PC, or my Matlab settings that would render pcolor impotent?
>
> Thanks,
> -Jeff
>
> My code is probably too long for this forum, but here it is, anyway:
>
> % One Dimensional Cellular Automata
> % plot using pcolor() as 2D array where vertical direction is time
>
> n=100; % size of the CA
> t=101; % how many timesteps
> k=2;
> m=1;
>
> a=zeros(t,n);
> iv=0;
>
> while iv<m,
> rc=round(rand(1)*n)+1;
> if a(1,rc) ==0
> a(1,rc)=1;
> iv=iv+1;
> end
> end
>
> for s=2:t-1,
>
> for c=1:n,
> cm=c-1;
> cp=c+1;
> if cm<1
> cm=n;
> end
> if cp>n
> cp=1;
> end
> a(s,c)=mod(a(s-1,cm)+a(s-1,cp),k);
> end
>
> pcolor(a);
> hold on;
> drawnow;
>
> end
From: Jeff on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hjhbb3$t7a$1(a)fred.mathworks.com>...
> Dear Jeff!
>
> > So this is some type of display issue. How can I fix this?
>
> Do you have the newest drivers for your graphics card?
> Did you (buy and) install the newest Matlab?
>
> Good luck - it sounds not trivial :-( Jan

I have V7.8.0.347, 32-bit for Windows. I'm using Windows Vista 64-bit. I'm working on the drivers for the graphics card now (Lenovo is not easy to deal with!).