Re: Question about Maple (a color problem)



"anthony" <anthony.canu@xxxxxxxxxxx> wrote in message
news:1133813316.195675.223320@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I tried that but unfortunately :
>
>> Enumerate:= proc(L) local n; [seq]([n,L[n]],n=1..nops(L)) end;
>
> Enumerate :=
>
> proc(L) local n; [seq]([n, L[n]], n = 1 .. nops(L)) end proc
>
>> plots[display](map(x->plots[textplot](x,color=[orange,red,blue,brown,green,coral,cyan,magenta,turquoise,violet][parse(x[3])+1]),[seq(map(x->ListTools:-Interleave(x,[i]),Enumerate(StringTools:-Explode(sprintf("%02d",die()))))[],i=1..10)]),axes=none,view=[-15..15,1..10]);
> Error, (in sprintf) integer expected for integer format

You have to enter your definition of die() before doing that, i.e.

die := rand(0..36):

Alec


.


Quantcast