Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Stumped again on a simple list

  • To: mathgroup at
  • Subject: [mg32830] Re: [mg32795] Stumped again on a simple list
  • From: WhoamI <lushstring at>
  • Date: Thu, 14 Feb 2002 01:43:59 -0500 (EST)
  • Sender: owner-wri-mathgroup at

--- "1.156" <rob at> wrote:
> Greetings cypherers all,
> I make a simple list ii and I find I can make other
> lists easily by algebraic moves like
> jj=ii/2, etc.  But when I want make a new list which
> splits two different formula, I'm stumped.
> Here's a stripped down version to illustrate my
> problem.  I want to use the value in the original
> array to determine how to make the new array.  The
> If[] is the only thing I can find to make
> this decision.  But, it seems I'm not even close
> when I try:
> ii=Table[z,{z,50,1400,5}];
> jj=If[ii<100,50,200]
> I've looked around a good bit but have not stumbled
> into any topic that appears to bear on this problem.
> Can I please ask a kind soul to (again) point me in
> the right direction?
> Thanks, Rob
You should try sometjhing like this:

jj = Map[If[# < 100, 50, 200] &, ii]

Cesar Guerra
Secc. Fisica PUCP-Lima

Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!

  • Prev by Date: Notebook manipulation
  • Next by Date: RE: Stumped again on a simple list
  • Previous by thread: Re: Stumped again on a simple list
  • Next by thread: RE: Stumped again on a simple list