Re: Weird vanishing syntax coloring
- To: mathgroup at smc.vnet.net
- Subject: [mg107250] Re: Weird vanishing syntax coloring
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Sat, 6 Feb 2010 03:27:21 -0500 (EST)
- References: <201001280744.CAA23569@smc.vnet.net> <hkgl43$6tm$1@smc.vnet.net>
On my Mac and version 7.0.1 your code works without errors and syntax-coloring works too. "James Taylor" wrote: > I have a notebook that fails to show my variables in dark blue most of > the time--they all are black characters. The code I am most interested > in also fails to run a Manipulate statement most of the time--it then > shows the Manipulate frame with "Abort" inside it instead of my plot. > Any ideas? Bug in version 7.0.0 for the Mac? > > Thanks! > James > > The code: > r = 0.25; infVar = .1; > c = 0.2; > P = 100000; > rec = 0.01; > infCenter = (r c)/P; > infStart = infCenter/2; > infEnd = infCenter*1.5; > infIncrement = (infEnd - infCenter)/20; > dt = 1; > > Manipulate[ > Clear[S, II]; > inf = infVar; > > S[t_] := S[t] = S[t - 1] - inf*S[t - 1]*II[t - 1]*dt; > II[t_] := II[t] = II[t - 1] + inf*S[t - 1]*II[t - 1]*dt - > rec*II[t - 1]*dt; > R[t_] := R[t] = R[t - 1] + rec*II[t - 1]*dt; > > S[0] = P; > II[0] = 100; > II[-1] = > 100; (* So that Round[II[n]]-Round[II[n-1]] has a value for t=-1 \ > the first time, when calculating new infections *) > R[0] = 0; > > infTable = > Table[{n, Round[S[n]], Round[II[n]], > Max[0, Round[II[n]] - Round[II[n - 1]]], Round[R[n]]}, {n, 0, > 500}] ; > > ListPlot[infTable[[All, {1, 2}]], PlotStyle -> PointSize[0.01], > Joined -> True, PlotRange -> {0, 100000}, > PlotLabel -> "inf coeff " infVar], {infVar, infStart, infEnd, > infIncrement}] > > May your trails be crooked, winding, lonesome, dangerous, leading to the > most amazing view. May your mountains rise into and above the clouds. > --Edward Abbey > > Nothing in the cry > of cicadas suggests they > are about to die > --Basho > > First there is a mountain, then there is no mountain, then there is. > --Donovan > > James C Taylor > Computer Science & Technology Department > Santa Fe Preparatory School > 1101 Camino de la Cruz Blanca > Santa Fe, NM 87505 > (505) 982-1829 x1241 (voice), 982-2897 (fax) > www.sfprep.org/dept-computer > jtaylor at sfprep.org > -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de