Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Redefine Power

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65856] Re: Redefine Power
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 19 Apr 2006 04:54:04 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <e1vf2m$9e8$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Power[] has the attribute Listable and this comes 
before any rule
like yours apply. So to do that, you must remove 
the Listable attribute
from Power[].

Regards
  Jens

"suchaneck" <greenux at gmx.de> schrieb im 
Newsbeitrag news:e1vf2m$9e8$1 at smc.vnet.net...
| hi,
| i want to redefine the Power function for 
matrices like that:
| Power[A_?MatrixQ,n_]:=mppower[A,n];
| If n is a number, then it should execute the 
function mppower[], elseif
| Head[n]=symbol, it should return the matrix with 
exp n as symbol
| without execution. How can I prevent the 
recursion of the Power-Function?
| Thanks.
| 




  • Prev by Date: Re: setps problem/how to set matrix elements
  • Next by Date: Re: No success with a package from the Wolfram Website
  • Previous by thread: Redefine Power
  • Next by thread: Define new constant as Pi is