MathGroup Archive 2005

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

Search the Archive

Lists


Hi everyone,

I have the following list and the code:
tmp = {{1, 2, 3, 4, 4, 5}, {2, 3, 4, 7, 7, 7}};

fitness[parameters_List] := Module[{test},
      Print [parameters];
 ];

init[fitFct_, tmp_List] := Module[{fitnesses},
Print  [tmp];
    fitnesses = Map[fitFct, tmp];
    ]

However, when I do the following I get an error
init[fitness, tmp]

It prints the tmp value in init correctly which is:
{{1, 2, 3, 4, 4, 5}, {2, 3, 4, 7, 7, 7}}

However gives an error after that.. (in the fitnesses)
12345
Set::setraw Cannot assign to raw object 1
234777
Set::setraw Cannot assign to raw object 2

Just wondering as to why that is? I am not sure what I did wrong.

Thanks a lot in advance.


  • Prev by Date: Re: Intersection of coordinate axes in origin (3d plot)
  • Next by Date: Re: How to call a remote Kernal?
  • Previous by thread: Re: Pb with the function Plot
  • Next by thread: Re: Lists