MathGroup Archive 2003

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

Search the Archive

Re: ask for help on list operation


Sabrina,

look at MapIndexed :

MapIndexed[(#1 - minlist[[Last@#2]] )/
((maxlist[[Last@#2]] - minlist[[Last@#2]])) &,
          A , {2}] // MatrixForm


or, elegantly using the list properties:

(# - minlist)/(maxlist - minlist) & /@ A  // MatrixForm
or
Map[ (# - minlist)/(maxlist - minlist) &, A]// MatrixForm

here the first "#" stands for the first row of A,
and you can subtract minlist from it (tough you cannot
subtract minlist from the whole A in one move, got to do
it row by row.

W.


  • Prev by Date: Re: errors while picking random numbers under constraint and in loop also
  • Next by Date: Re: Negation of Negation wanted
  • Previous by thread: Re: ask for help on list operation
  • Next by thread: PackedArray Bug?