From: Jeff on 24 Jan 2010 20:48 I added 'shading interp' as the first line. Is that what you're recommending? I got the same results. I also tried replacing pcolor(a) with image(a) and had a similar problem. "Adam Pilchak" <adam.pilchak(a)gmail.com> wrote in message <hjhl63$mm8$1(a)fred.mathworks.com>... > 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 25 Jan 2010 15:35 OK, I properly installed the student version of R2009a (v7.8.0.347) and I'm getting better results - the figure displays correctly now. However, the simple program runs very slow (it takes like a minute), and I'm still having other related issues. For example, after the program runs, I choose Edit - Copy Figure, and Matlab hangs. I have also updated all of my graphics and BIOS device drivers. Anyone have further thoughts on what's wrong? Can anyone tell me how long this simple program takes to run on your PC (mine is a 64-bit Windows with a quad Intel CPU)? My professor says it runs nearly instantly on his PC, but it takes like a minute to run on my PC. "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
From: ImageAnalyst on 25 Jan 2010 17:49 On Jan 25, 3:35 pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net> wrote: > Anyone have further thoughts on what's wrong? Can anyone tell me how long this simple program takes to run on your PC (mine is a 64-bit Windows with a quad Intel CPU)? My professor says it runs nearly instantly on his PC, but it takes like a minute to run on my PC. ------------------------------------------------------------------------------------ Takes 28 or 29 seconds to run on my Dell dual core running 32 bit WinXP. Put a tic/toc in the code to see how long it really takes. Maybe your prof has a really fast computer.
From: Jody Klymak on 25 Jan 2010 19:12 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <50825865-a1f0-44ac-a465-20f84028f669(a)k22g2000vbp.googlegroups.com>... > On Jan 25, 3:35 pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net> > wrote: > > Anyone have further thoughts on what's wrong? Can anyone tell me how long this simple program takes to run on your PC (mine is a 64-bit Windows with a quad Intel CPU)? My professor says it runs nearly instantly on his PC, but it takes like a minute to run on my PC. > > > ------------------------------------------------------------------------------------ > Takes 28 or 29 seconds to run on my Dell dual core running 32 bit > WinXP. I get the same on a quad-core Mac. If I put the pcolor call outside the for-loop it runs almost instantly.
From: Jeff on 26 Jan 2010 00:19 "Jody Klymak" <jklymak(a)gmail.com> wrote in message <hjlc0j$72g$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <50825865-a1f0-44ac-a465-20f84028f669(a)k22g2000vbp.googlegroups.com>... > > On Jan 25, 3:35 pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net> > > wrote: > > > Anyone have further thoughts on what's wrong? Can anyone tell me how long this simple program takes to run on your PC (mine is a 64-bit Windows with a quad Intel CPU)? My professor says it runs nearly instantly on his PC, but it takes like a minute to run on my PC. > > > > > > ------------------------------------------------------------------------------------ > > Takes 28 or 29 seconds to run on my Dell dual core running 32 bit > > WinXP. > > I get the same on a quad-core Mac. > > If I put the pcolor call outside the for-loop it runs almost instantly. Thanks ImageAnalyst and Jody for the comparison runs. Using tic/toc it took me about 34.3 seconds. I think my quad core 64-bit WinVista should run faster than you guys, but 34 sec. probably indicates I had a bad installation before. My professor's PC is older than mine. I accidentally bought a monstrous quad-core since I had no idea what I was buying and my dad volunteered to help with the cost. :D (But it's really heavy to lug around school). One (hopefully) last question: After you run the program (SAVE ALL YOUR IMPORTANT WORK, FIRST), if you click Edit - Copy Figure, do you get funny results like the menu doesn't go away for many minutes. If you click Edit - Copy Figure a second time, do you get memory errors that hang your Matlab? If so, there may be a general Matlab bug. I may call Matlab's tech support in the morning. Once again, thanks, -Jeff
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: optimal number of cluster Next: problem with fprintf output |