MathGroup Archive 2001

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

Search the Archive


  • To: mathgroup at
  • To: mathgroup at
  • Subject: [mg29240] Conditions
  • From: Yannis.Paraskevopoulos at
  • Date: Thu, 7 Jun 2001 01:14:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi again,

I've been puzzled by the following problem which I  have to admit it's 
not complicated but yet...

assume that we have a matrix m with dimensions (RxC) then create a 
vector v, which has value 0 when there is a zero at any point across 
m's row. Otherwise v's value would be equal to the last value of the 
corresponding m row.

I tried for example:

I initiated a vector v={a,b}. I had to that as 


Out:= {1,1} when I expected {0,1}

I also tried

v:=0 /; g/.x_:>x==0

with same results.

Its obvious to me that I do something stupid but I can't figure it out. 
Any help would be very much appreciated.

Best regards


Visit our website at

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

  • Prev by Date: Re: Line numbers
  • Next by Date: RE:Inverse Interpolating Functions
  • Previous by thread: RE: Reverse the vertical axis
  • Next by thread: Re: Conditions