MathGroup Archive 2009

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

Search the Archive

Re: put some elements to zero

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101487] Re: put some elements to zero
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Wed, 8 Jul 2009 07:13:16 -0400 (EDT)

Dear Luigi,
there are several ways. How about this one:

g[{x_, y_}] := {x, 0};

In[31]:= g /@ {{x1, y1}, {x2, y2}, {x3, y3}}

Out[31]= {{x1, 0}, {x2, 0}, {x3, 0}}

Have fun, Alexei



Dear All,
 I have a matrix with only two columns and many rows. For instance
{xi,yi}.
For those xi<x0, I would like to set yi=0.
I can only think of a very inefficient loop...

thanks
-Luigi-

-- 
Alexei Boulbitch, Dr., habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.




  • Prev by Date: Re: including specific values in parametric plots
  • Next by Date: Animate parametric plot of two lists?
  • Previous by thread: Re: put some elements to zero
  • Next by thread: Re: put some elements to zero