       Re: Experimental`'NumericalFunction''

• To: mathgroup at smc.vnet.net
• Subject: [mg115971] Re: Experimental`'NumericalFunction''
• From: Peter Pein <petsie at dordos.net>
• Date: Fri, 28 Jan 2011 06:11:53 -0500 (EST)
• References: <ihrb5t\$8sl\$1@smc.vnet.net>

```Taking a look at earlier posts allows the guesses:
n=5;d[n+1]=0;p=43/500;q=1;conj=Conjugate;

after entering f as shown below and
Cases[f, _Complex, Infinity] // Length
we see that there are 192 complex terms in f, but this is not what the

In:= Cases[
simpf = Simplify[ComplexExpand[f]], _Complex, \[Infinity]]
Out= {}

In:=
FindMinimum[{simpf,Sum[a[i]^2+b[i]^2,{i,0,n}]==1},Variables[simpf]]//Chop
Out=
{-1.,{a->0,a->0.707107,a->0,a->0,a->0,a->0,b->0,b->0.707107,b->0,b->0,b->0,b->0}}

In:=
NMinimize[{simpf,Sum[a[i]^2+b[i]^2,{i,0,n}]==1},Variables[simpf]]//Chop
Out=
{-1.,{a->0,a->0.906539,a->0,a->0,a->0,a->0,b->0,b->0.422122,b->0,b->0,b->0,b->0}}

In:= a^2+b^2/.Last[%]
Out= 1.

and again |d|=1 seems to be the solution.

Peter

On 27.01.2011 09:42, DrMajorBob wrote:
> You didn't tell us what "conj" is or what values "q" and "i" have, and you
> didn't show the NMinimize statement.
>
> Bobby
>
> On Wed, 26 Jan 2011 04:03:42 -0600, tarun dutta<tarunduttaz at gmail.com>
> wrote:
>
>> NMinimize::nnum: The function value
>> Experimental`NumericalFunction[{Hold[prob],Block},{{{},Hold[a]},
>> {{},Hold[a]},{{},Hold[a]},{{},Hold[a]},{{},Hold[a]},
>> {{},Hold[a]},{{},Hold[b]},{{},Hold[b]},{{},Hold[b]},
>> {{},Hold[b]},<<2>>},{{<<1>>}},{<<1>>},{444,<<5>>,None},
>> {None,None,None}] is not a number at
>> {a,a,a,a,a,a,b,b,b,b,<<2>>} =
>> {0.304936,0.266141,0.365626,0.132704,0.870404,0.952376,-0.523097,0.275125,-0.797803,0.291049,<<2>>}.
>>>>
>>
>> the expression what I am using does not contain any imaginary parts
>> after simplification,still it shows above error..the expression ( f )
>> is following-----
>>
>> d[i_] = a[i] + I*b[i];
>> f = Together[
>>     Sum[4*p*(Sqrt[i + 1]*d[i]*
>>           conj[d[i + 1]]*(Sum[
>>             Sqrt[i + 1]*conj[d[i]]*d[i + 1], {i, 0, n}]) +
>>          Sqrt[i + 1]*conj[d[i]]*
>>           d[i + 1]*(Sum[
>>             Sqrt[i + 1]*d[i]*conj[d[i + 1]], {i, 0, n}])) + (i (i -
>>             1) - q*i)* d[i]*conj[d[i]], {i, 0, n}]];
>>
>> so kindly give some valuable insight...
>> with regards,
>> tarun
>>
>
>

```

• Prev by Date: Re: eigenstructure table in linear model fit
• Next by Date: Re: Declaring the golbal variables in Packages
• Previous by thread: Re: Experimental`'NumericalFunction''
• Next by thread: importing DICOM files not working in 8.0