MathGroup Archive 2009

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

Search the Archive

Re: put some elements to zero

  • To: mathgroup at
  • Subject: [mg101487] Re: put some elements to zero
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • 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
For those xi<x0, I would like to set yi=0.
I can only think of a very inefficient loop...


Alexei Boulbitch, Dr., habil.
Senior Scientist

ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern

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


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