Re: pattern
- To: mathgroup at smc.vnet.net
- Subject: [mg84373] Re: pattern
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Thu, 20 Dec 2007 00:14:41 -0500 (EST)
On 12/19/07 at 4:14 AM, orelang at gmail.com wrote: >I want to define a function that accepts only one argument - a 2x2 >matrix and not any more. >Is it possible? Yes. For example f[x_]:=Total[x]/;Dimensions[x]=={2,2} will return a list of two elements if x is a 2 x 2 matrix and will return f[x] unevaluated if x is not a 2 x 2 matrix. -- To reply via email subtract one hundred and four