MathGroup Archive 1996

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

Search the Archive

Re: addressing matrix elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3578] Re: addressing matrix elements
  • From: Harald Berndt <haraldb at nature.berkeley.edu>
  • Date: Mon, 25 Mar 1996 21:35:56 -0500
  • Organization: University of California Forest Prodcts Lab
  • Sender: owner-wri-mathgroup at wolfram.com

David Cabana wrote:
...
> More generally, I would like to be able to apply a function f to each
> element in a matrix of arbitrary size and dimensions, without worrying
> about the particulars of the matrix representation via lists.  I want
> func[M, g] to return a matrix of the same size and shape as M, with
> elements formed by applying g to corresponding elements of M.

...

> SetAttributes Listable,

You had it right there! SetAttributes[f, Listable] should do the 
trick.
-- 
______________________________________________________________________
Harald Berndt,                                University of California
Research Specialist                         Forest Products Laboratory

Phone:	510-215-4224                                FAX:			510-215-4299

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Showing infinite values in Grafics ??
  • Next by Date: Re: mathematica-macppp conflict
  • Previous by thread: Re: addressing matrix elements
  • Next by thread: Re: addressing matrix elements