Re: Re: pattern
- To: mathgroup at smc.vnet.net
- Subject: [mg84402] Re: [mg84377] Re: pattern
- From: Daniel Huber <dh at metrohm.ch>
- Date: Fri, 21 Dec 2007 03:25:00 -0500 (EST)
- References: <3eb7b73d-e7dd-488e-abdc-0d0d1473258d@x69g2000hsx.googlegroups.com> <fkanuj$dlh$1@smc.vnet.net> <200712200516.AAA02315@smc.vnet.net> <32C1CC3A-C4AF-4C59-98B0-845EF4079EAE@wolfram.com>
Well, what about: f[x_List/;Dimensions[x]=={2,2}]:= ... Brett Champion wrote: > On Dec 19, 2007, at 11:16 PM , dh wrote: > >> >> >> Hi, >> >> consider: >> >> f[x_/;Dimensions[x]=={2,2}]:= ... >> > > Dimensions alone strictly speaking isn't a strong enough test for the > user's function. > > In[188]:= Dimensions[g[g[1, 2], g[3, 4]]] == {2, 2} > Out[188]= True > > :-) > > Brett > >> hope this helps, Daniel >> >> >> >> 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? >> >>> >> >>> orelang >> >> > > > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.ch>
- References:
- Re: pattern
- From: dh <dh@metrohm.ch>
- Re: pattern