Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28210] Re: Help
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 5 Apr 2001 03:00:26 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9aela9$nb1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

mat = Array[m, {4, 6}]

vec = Array[s, {6}]

q=Transpose[(#1 - #2)/#2 &  @@@ Transpose[{Transpose[mat], vec}]]

Regards
  Jens


Yannis.Paraskevopoulos at ubsw.com wrote:
> 
> Hi all,
> 
> I would appreciate your help on the following problem:
> 
> assume that we have a matrix m with dimensions (RxC) and a vector s
> with dimensions (Rx1). Now what I want is to create another matrix Q
> 
> If m[[i,j]]>s[[i]], then Q=(m[[i,j]]-s[[i]])/s[[i]], for {i,1,R},{j,1,C}
> 
> I'm sure there must be an elegant and fast way to do that.
> 
> Best Regards
> 
> yannis


  • Prev by Date: Ted's Root Finder
  • Next by Date: InputAliases
  • Previous by thread: Re: Help
  • Next by thread: Re: Help