MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Strange bug


On Mon, 3 Jan 2005 09:41:47 +0000 (UTC), Steve Gray <stevebg at adelphia.net> wrote:

The problem here is I forgot the semicolon after the ] following the second For.
Thanks to Dr.Bob.

>
>ordermat[gon_] := Module[{row, rx, cx},
>    gonl = Length[gon];
>    matx = Table[0, {i, 1, gonl}, {j, 1, gonl}];
>    gona = Join[gon, gon];
>    For [ rx = 1, rx <= gonl, rx++,
>      	row  = Table[0, {2*gonl}];
>      	row[[rx]] = 1;
>      	row[[rx + 1]] = 2;
>               ab = gona[[rx]];
>      	ae = gona[[rx + 1]];
>      	For [ cx = 1, cx <= gonl - 3, cx++,
>          	       bb = gona[[cx + rx + 1]];
>          	       be = gona[[cx + rx + 2]];
>          	       int = intersect[ab, ae, bb, be];
>          	       If [ int == 3, row[[cx + rx + 1]] = tafr + 1];
>          	   ]
>               rx;                  (*   Error unless some expression is here.?? *)
>               matx[[rx]] = Table[Max[row[[i]], row[[i + gonl]]], {i, gonl}];
>           ]
>    ] 


  • Prev by Date: Re: How to draw a trajectory in DensityPlot&#65311;
  • Next by Date: UnitStep warning: 2nd post
  • Previous by thread: Re: Strange bug
  • Next by thread: Re: Strange bug