Re: How to test if list of arguments are numeric
- To: mathgroup at smc.vnet.net
- Subject: [mg89519] Re: How to test if list of arguments are numeric
- From: Oliver Ruebenkoenig <ruebenko at uni-freiburg.de>
- Date: Wed, 11 Jun 2008 05:15:18 -0400 (EDT)
- References: <g2nu84$ej1$1@smc.vnet.net>
Hi,
try
testFunction[ avec : {_Real ..} ] := Module[{},
avec + 1.
]
hth,
Oliver
OnWed, 11 Jun 2008, Michael A. Gilchrist wrote:
> Hi all,
>
> I'm trying to use a function with NMinimize and running into problems with
> holding off its evaluation until NMinimize passes real values. Essentially, I
> have something like this
>
> TestFunction[avec_]:=Module[{},
> .
> .
> .
> ]
>
> Where avec should be a list of real numbers. I know that to ensure avec is a
> list I use avec_?ListQ, but I need to ensure that avec is a list of real
> numbers (not the symbols that NMinimizes passes).
>
> Unfortunately, I have no idea what the correct syntax is. Could someone
> please clue me in on this?
>
> Thanks in advance.
>
> Mike
>
>
>
Oliver Ruebenkoenig, <ruebenko AT uni-freiburg.de>