MATLAB Newsgroup

Hi,

I have the following two sets of equations:

integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) = 1.................(1)

and

integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) = GQ.......(2)

every other variable here is known except for amda1 and lamda2, how can I solve for lamda1 and lamda2.

Any suggestion will help.

achenyo at wrote:

> Hi,

> I have the following two sets of equations:

>

> integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> 1.................(1)

>

> and

>

> integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) =

> GQ.......(2)

>

> every other variable here is known except for amda1 and lamda2, how can

> I solve for lamda1 and lamda2.

Your equations are probably not valid. The indefinite integral of any equation

does not equal an exact value: it equals a value plus an arbitrary constant.

You are thus trying to solve two equations in four unknowns.

Does your dF0(go) represent the differentiation of a known function F0, with

respect to unspecified variable, and then evaluating the differential at the

point g0 ? (note go vs g0 for one thing)

Does dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) ? You

were careful to use * to indicate multiplication everywhere else, so we are

left to wonder whether you wished to denote something different.

Which variables are the equations being integrated with respect to? If the

answer is either go or g1 then the integral cannot be treated as if dF0(go) or

dF1(g1) are just constants with known values and funny names.

*If* dF0(g0) and dF1(g1) are constants for the purpose of integration

(implying integration over lamda1, lamda2 or KNB) and if multiplication was

intended, and if the arbitrary constants are added in, and if the integration

just _happens_ to be over lamda1 in both cases, then the solution is:

lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq - dF0(go) * dF1(g1) * C2 + g0 * C1)

/ KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) * dF1(g1) - 1)

lamda2 = -

(-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

(dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) * Gq * g1 - dF0(g0) * dF1(g1) *

C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

(dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 * g1) / KNB / g0^2 / dF0(g0) /

dF1(g1) / (dF0(g0) * dF1(g1) - 1)

Notice the leading "-" on the value for lamda2 .

Walter Roberson <roberson@hushmail.com> wrote in message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

> achenyo at wrote:

> > Hi,

> > I have the following two sets of equations:

> >

> > integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> > 1.................(1)

> >

> > and

> >

> > integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) =

> > GQ.......(2)

> >

> > every other variable here is known except for amda1 and lamda2, how can

> > I solve for lamda1 and lamda2.

>

> Your equations are probably not valid. The indefinite integral of any equation

> does not equal an exact value: it equals a value plus an arbitrary constant.

> You are thus trying to solve two equations in four unknowns.

>

> Does your dF0(go) represent the differentiation of a known function F0, with

> respect to unspecified variable, and then evaluating the differential at the

> point g0 ? (note go vs g0 for one thing)

>

> Does dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) ? You

> were careful to use * to indicate multiplication everywhere else, so we are

> left to wonder whether you wished to denote something different.

>

> Which variables are the equations being integrated with respect to? If the

> answer is either go or g1 then the integral cannot be treated as if dF0(go) or

> dF1(g1) are just constants with known values and funny names.

>

>

> *If* dF0(g0) and dF1(g1) are constants for the purpose of integration

> (implying integration over lamda1, lamda2 or KNB) and if multiplication was

> intended, and if the arbitrary constants are added in, and if the integration

> just _happens_ to be over lamda1 in both cases, then the solution is:

>

> lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq - dF0(go) * dF1(g1) * C2 + g0 * C1)

> / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) * dF1(g1) - 1)

>

> lamda2 = -

> (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) * Gq * g1 - dF0(g0) * dF1(g1) *

> C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 * g1) / KNB / g0^2 / dF0(g0) /

> dF1(g1) / (dF0(g0) * dF1(g1) - 1)

>

> Notice the leading "-" on the value for lamda2 .

Thanks Walter,

Yes dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are not constants, they are functions (CDF of Rayleigh distribution) and the integration is w.r.t. to g0 and g1.

Thanks for your help.

Cheers

achenyo at wrote:

> Walter Roberson <roberson@hushmail.com> wrote in message

> <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

>> achenyo at wrote:

>> > I have the following two sets of equations:

>> > > integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) = >

>> 1.................(1)

>> > > and

>> > > integral of

>> ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) = > GQ.......(2)

>> > > every other variable here is known except for amda1 and lamda2,

>> how can > I solve for lamda1 and lamda2.

> Yes dF0(go)dF1(g1) represent the multiplication of

> dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are not constants, they are

> functions (CDF of Rayleigh distribution) and the integration is w.r.t.

> to g0 and g1.

You did not happen to respond to the point about definite versus

indefinite integral, but even without knowing that, we can be certain

that there is no way to solve that system of equations without knowing

dF0(g0) and dF1(g1). You also have to be specific about which expression

is being integrated with respect to which variable -- or is it an

unstated double integration instead of a single integration that your

original post implies?

"achenyo at" <achenyo2001@yahoo.com> wrote in message <i4a3vk$irq$1@fred.mathworks.com>...

> Walter Roberson <roberson@hushmail.com> wrote in message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

> > achenyo at wrote:

> > > Hi,

> > > I have the following two sets of equations:

> > >

> > > integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> > > 1.................(1)

> > >

> > > and

> > >

> > > integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) =

> > > GQ.......(2)

> > >

> > > every other variable here is known except for amda1 and lamda2, how can

> > > I solve for lamda1 and lamda2.

> >

> > Your equations are probably not valid. The indefinite integral of any equation

> > does not equal an exact value: it equals a value plus an arbitrary constant.

> > You are thus trying to solve two equations in four unknowns.

> >

> > Does your dF0(go) represent the differentiation of a known function F0, with

> > respect to unspecified variable, and then evaluating the differential at the

> > point g0 ? (note go vs g0 for one thing)

> >

> > Does dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) ? You

> > were careful to use * to indicate multiplication everywhere else, so we are

> > left to wonder whether you wished to denote something different.

> >

> > Which variables are the equations being integrated with respect to? If the

> > answer is either go or g1 then the integral cannot be treated as if dF0(go) or

> > dF1(g1) are just constants with known values and funny names.

> >

> >

> > *If* dF0(g0) and dF1(g1) are constants for the purpose of integration

> > (implying integration over lamda1, lamda2 or KNB) and if multiplication was

> > intended, and if the arbitrary constants are added in, and if the integration

> > just _happens_ to be over lamda1 in both cases, then the solution is:

> >

> > lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq - dF0(go) * dF1(g1) * C2 + g0 * C1)

> > / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) * dF1(g1) - 1)

> >

> > lamda2 = -

> > (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) * Gq * g1 - dF0(g0) * dF1(g1) *

> > C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 * g1) / KNB / g0^2 / dF0(g0) /

> > dF1(g1) / (dF0(g0) * dF1(g1) - 1)

> >

> > Notice the leading "-" on the value for lamda2 .

>

>

> Thanks Walter,

> Yes dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are not constants, they are functions (CDF of Rayleigh distribution) and the integration is w.r.t. to g0 and g1.

>

> Thanks for your help.

> Cheers

- - - - - - - -

As a first step on your problem I believe you will need to use the pdf functions of the Rayleigh distribution to get

dF0(g0) = g0/sigma0^2*exp(-g0^2/(2*sigma^2))*dg0

and likewise with dF1(g1). The integrands in each double integral can be separated into the difference between two terms, each of which can be factored with only g0 in one factor and g1 in the other factor. Therefore each double integral can be written as the difference between products of single integrals, one involving only g0 and the other g1. Then you can attempt to find analytic expressions for each of these single integrals.

Roger Stafford

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i4a730$7ev$1@fred.mathworks.com>...

> "achenyo at" <achenyo2001@yahoo.com> wrote in message <i4a3vk$irq$1@fred.mathworks.com>...

> > Walter Roberson <roberson@hushmail.com> wrote in message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

> > > achenyo at wrote:

> > > > Hi,

> > > > I have the following two sets of equations:

> > > >

> > > > integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> > > > 1.................(1)

> > > >

> > > > and

> > > >

> > > > integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) =

> > > > GQ.......(2)

> > > >

> > > > every other variable here is known except for amda1 and lamda2, how can

> > > > I solve for lamda1 and lamda2.

> > >

> > > Your equations are probably not valid. The indefinite integral of any equation

> > > does not equal an exact value: it equals a value plus an arbitrary constant.

> > > You are thus trying to solve two equations in four unknowns.

> > >

> > > Does your dF0(go) represent the differentiation of a known function F0, with

> > > respect to unspecified variable, and then evaluating the differential at the

> > > point g0 ? (note go vs g0 for one thing)

> > >

> > > Does dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) ? You

> > > were careful to use * to indicate multiplication everywhere else, so we are

> > > left to wonder whether you wished to denote something different.

> > >

> > > Which variables are the equations being integrated with respect to? If the

> > > answer is either go or g1 then the integral cannot be treated as if dF0(go) or

> > > dF1(g1) are just constants with known values and funny names.

> > >

> > >

> > > *If* dF0(g0) and dF1(g1) are constants for the purpose of integration

> > > (implying integration over lamda1, lamda2 or KNB) and if multiplication was

> > > intended, and if the arbitrary constants are added in, and if the integration

> > > just _happens_ to be over lamda1 in both cases, then the solution is:

> > >

> > > lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq - dF0(go) * dF1(g1) * C2 + g0 * C1)

> > > / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) * dF1(g1) - 1)

> > >

> > > lamda2 = -

> > > (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > > (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) * Gq * g1 - dF0(g0) * dF1(g1) *

> > > C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) * exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > > (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 * g1) / KNB / g0^2 / dF0(g0) /

> > > dF1(g1) / (dF0(g0) * dF1(g1) - 1)

> > >

> > > Notice the leading "-" on the value for lamda2 .

> >

> >

> > Thanks Walter,

> > Yes dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are not constants, they are functions (CDF of Rayleigh distribution) and the integration is w.r.t. to g0 and g1.

> >

> > Thanks for your help.

> > Cheers

> - - - - - - - -

> As a first step on your problem I believe you will need to use the pdf functions of the Rayleigh distribution to get

>

> dF0(g0) = g0/sigma0^2*exp(-g0^2/(2*sigma^2))*dg0

>

> and likewise with dF1(g1). The integrands in each double integral can be separated into the difference between two terms, each of which can be factored with only g0 in one factor and g1 in the other factor. Therefore each double integral can be written as the difference between products of single integrals, one involving only g0 and the other g1. Then you can attempt to find analytic expressions for each of these single integrals.

>

> Roger Stafford

---------------

Thanks Roger, I have the CDF functions already and I have been able to separate the integrands as you suggested but I am now having problem solving for lambda 1 and lamda2 analytically? I've tried using the function "solve" but it's not working. Please how can I do this in matlab?

Cheers.

> "Roger Stafford"

> <ellieandrogerxyzzy@mindspring.com.invalid> wrote in

> message <i4a730$7ev$1@fred.mathworks.com>...

> > "achenyo at" <achenyo2001@yahoo.com> wrote in

> message <i4a3vk$irq$1@fred.mathworks.com>...

> > > Walter Roberson <roberson@hushmail.com> wrote in

> message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

> > > > achenyo at wrote:

> > > > > Hi,

> > > > > I have the following two sets of equations:

> > > > >

> > > > > integral of

> ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> > > > > 1.................(1)

> > > > >

> > > > > and

> > > > >

> > > > > integral of

> ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g

> 1) =

> > > > > GQ.......(2)

> > > > >

> > > > > every other variable here is known except for

> amda1 and lamda2, how can

> > > > > I solve for lamda1 and lamda2.

> > > >

> > > > Your equations are probably not valid. The

> indefinite integral of any equation

> > > > does not equal an exact value: it equals a

> value plus an arbitrary constant.

> > > > You are thus trying to solve two equations in

> four unknowns.

> > > >

> > > > Does your dF0(go) represent the differentiation

> of a known function F0, with

> > > > respect to unspecified variable, and then

> evaluating the differential at the

> > > > point g0 ? (note go vs g0 for one thing)

> > > >

> > > > Does dF0(go)dF1(g1) represent the

> multiplication of dF0(go) with dF1(g1) ? You

> > > > were careful to use * to indicate

> multiplication everywhere else, so we are

> > > > left to wonder whether you wished to denote

> something different.

> > > >

> > > > Which variables are the equations being

> integrated with respect to? If the

> > > > answer is either go or g1 then the integral

> cannot be treated as if dF0(go) or

> > > > dF1(g1) are just constants with known values

> and funny names.

> > > >

> > > >

> > > > *If* dF0(g0) and dF1(g1) are constants for the

> purpose of integration

> > > > (implying integration over lamda1, lamda2 or

> KNB) and if multiplication was

> > > > intended, and if the arbitrary constants are

> added in, and if the integration

> > > > just _happens_ to be over lamda1 in both cases,

> then the solution is:

> > > >

> > > > lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq -

> dF0(go) * dF1(g1) * C2 + g0 * C1)

> > > > / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) *

> dF1(g1) - 1)

> > > >

> > > > lamda2 = -

> > > > (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq -

> C2 + g0 + g0 * C1) / g0 /

> > > > (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) *

> Gq * g1 - dF0(g0) * dF1(g1) *

> > > > C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) *

> exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > > > (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 *

> g1) / KNB / g0^2 / dF0(g0) /

> > > > dF1(g1) / (dF0(g0) * dF1(g1) - 1)

> > > >

> > > > Notice the leading "-" on the value for lamda2

> .

> > >

> > >

> > > Thanks Walter,

> > > Yes dF0(go)dF1(g1) represent the multiplication

> of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are

> not constants, they are functions (CDF of Rayleigh

> distribution) and the integration is w.r.t. to g0 and

> g1.

> > >

> > > Thanks for your help.

> > > Cheers

> > - - - - - - - -

> > As a first step on your problem I believe you

> will need to use the pdf functions of the Rayleigh

> distribution to get

> >

> > dF0(g0) = g0/sigma0^2*exp(-g0^2/(2*sigma^2))*dg0

> >

> > and likewise with dF1(g1). The integrands in each

> double integral can be separated into the difference

> between two terms, each of which can be factored with

> only g0 in one factor and g1 in the other factor.

> Therefore each double integral can be written as the

> e difference between products of single integrals,

> one involving only g0 and the other g1. Then you can

> attempt to find analytic expressions for each of

> these single integrals.

> >

> > Roger Stafford

>

> ---------------

> Thanks Roger, I have the CDF functions already and I

> have been able to separate the integrands as you

> suggested but I am now having problem solving for

> lambda 1 and lamda2 analytically? I've tried using

> the function "solve" but it's not working. Please how

> can I do this in matlab?

>

> Cheers.

You have two nonlinear equations in two unknowns

(lambda1, lambda2). So you will have to use _fsolve_

to solve for lambda1 and lambda2.

Now, the two nonlinear equations contain

improper integrals - so in the routine where you have to

return the residuals of the two equations to fsolve,

you will have to call _quadgk_ to evaluate the integrals.

Best wishes

Torsten.

Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <2112777448.12038.1281962662245.JavaMail.root@gallium.mathforum.org>...

> > "Roger Stafford"

> > <ellieandrogerxyzzy@mindspring.com.invalid> wrote in

> > message <i4a730$7ev$1@fred.mathworks.com>...

> > > "achenyo at" <achenyo2001@yahoo.com> wrote in

> > message <i4a3vk$irq$1@fred.mathworks.com>...

> > > > Walter Roberson <roberson@hushmail.com> wrote in

> > message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...

> > > > > achenyo at wrote:

> > > > > > Hi,

> > > > > > I have the following two sets of equations:

> > > > > >

> > > > > > integral of

> > ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) =

> > > > > > 1.................(1)

> > > > > >

> > > > > > and

> > > > > >

> > > > > > integral of

> > ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g

> > 1) =

> > > > > > GQ.......(2)

> > > > > >

> > > > > > every other variable here is known except for

> > amda1 and lamda2, how can

> > > > > > I solve for lamda1 and lamda2.

> > > > >

> > > > > Your equations are probably not valid. The

> > indefinite integral of any equation

> > > > > does not equal an exact value: it equals a

> > value plus an arbitrary constant.

> > > > > You are thus trying to solve two equations in

> > four unknowns.

> > > > >

> > > > > Does your dF0(go) represent the differentiation

> > of a known function F0, with

> > > > > respect to unspecified variable, and then

> > evaluating the differential at the

> > > > > point g0 ? (note go vs g0 for one thing)

> > > > >

> > > > > Does dF0(go)dF1(g1) represent the

> > multiplication of dF0(go) with dF1(g1) ? You

> > > > > were careful to use * to indicate

> > multiplication everywhere else, so we are

> > > > > left to wonder whether you wished to denote

> > something different.

> > > > >

> > > > > Which variables are the equations being

> > integrated with respect to? If the

> > > > > answer is either go or g1 then the integral

> > cannot be treated as if dF0(go) or

> > > > > dF1(g1) are just constants with known values

> > and funny names.

> > > > >

> > > > >

> > > > > *If* dF0(g0) and dF1(g1) are constants for the

> > purpose of integration

> > > > > (implying integration over lamda1, lamda2 or

> > KNB) and if multiplication was

> > > > > intended, and if the arbitrary constants are

> > added in, and if the integration

> > > > > just _happens_ to be over lamda1 in both cases,

> > then the solution is:

> > > > >

> > > > > lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq -

> > dF0(go) * dF1(g1) * C2 + g0 * C1)

> > > > > / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) *

> > dF1(g1) - 1)

> > > > >

> > > > > lamda2 = -

> > > > > (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq -

> > C2 + g0 + g0 * C1) / g0 /

> > > > > (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) *

> > Gq * g1 - dF0(g0) * dF1(g1) *

> > > > > C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) *

> > exp((-Gq - C2 + g0 + g0 * C1) / g0 /

> > > > > (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 *

> > g1) / KNB / g0^2 / dF0(g0) /

> > > > > dF1(g1) / (dF0(g0) * dF1(g1) - 1)

> > > > >

> > > > > Notice the leading "-" on the value for lamda2

> > .

> > > >

> > > >

> > > > Thanks Walter,

> > > > Yes dF0(go)dF1(g1) represent the multiplication

> > of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are

> > not constants, they are functions (CDF of Rayleigh

> > distribution) and the integration is w.r.t. to g0 and

> > g1.

> > > >

> > > > Thanks for your help.

> > > > Cheers

> > > - - - - - - - -

> > > As a first step on your problem I believe you

> > will need to use the pdf functions of the Rayleigh

> > distribution to get

> > >

> > > dF0(g0) = g0/sigma0^2*exp(-g0^2/(2*sigma^2))*dg0

> > >

> > > and likewise with dF1(g1). The integrands in each

> > double integral can be separated into the difference

> > between two terms, each of which can be factored with

> > only g0 in one factor and g1 in the other factor.

> > Therefore each double integral can be written as the

> > e difference between products of single integrals,

> > one involving only g0 and the other g1. Then you can

> > attempt to find analytic expressions for each of

> > these single integrals.

> > >

> > > Roger Stafford

> >

> > ---------------

> > Thanks Roger, I have the CDF functions already and I

> > have been able to separate the integrands as you

> > suggested but I am now having problem solving for

> > lambda 1 and lamda2 analytically? I've tried using

> > the function "solve" but it's not working. Please how

> > can I do this in matlab?

> >

> > Cheers.

>

> You have two nonlinear equations in two unknowns

> (lambda1, lambda2). So you will have to use _fsolve_

> to solve for lambda1 and lambda2.

> Now, the two nonlinear equations contain

> improper integrals - so in the routine where you have to

> return the residuals of the two equations to fsolve,

> you will have to call _quadgk_ to evaluate the integrals.

>

> Best wishes

> Torsten.

----------------------------

Hi Torsten,

I have tried using the fsolve function following the examples given in Mathworks homepage but I keep getting this error:

"CAT arguments dimensions are not consistent".

Here is the fuction I have written:

function c= myfunct(lambda)

Bc = 60000;

No_dBm = -174; % background noise psd (dBm/Hz)

No_dB = -204; % background noise psd (dBW/Hz)

No = 10.^(No_dB./10); % psd linear value

Ps = 1;

G = 125;

B = 3.84e6;% Processing gain

Q = (No* B);

K = 0.08941;

% lambda0 = [-5; -5];

m = 1;

h_0 = random('rayleigh',64); %the distribution of g

g_0 = h_0^2; % channel gain

f = @(x)(((m/ g_0)^m).*((x.^(m-1))./gamma(m)).*exp((-m.*x)./g_0));

ff = (quad(f,g_0,10e12*g_0));

h_1 = random('rayleigh',64); %the distribution of g

g_1 = h_1^2;

v = @(x)((((m/g_1)^m).*((x.^(m-1))./gamma(m)).*exp((-m.*x)./g_1))

vv = (quad(f,g_1,10e12*g_1));

c = [(1/(lambda(1)+(lambda(2)*g_0)))*ff -((K*No*Bc*(1/g_1))*vv)-Ps;((1/(lambda(1)+(lambda(2)*g_0))*ff)-((1/g_1)*vv)-((G*Q)/g_0))];

end

the error is at this last part (i.e. at 'c')

and this is the way I have used the function in my main program:

[lambda,cval,exitflag] = fsolve(@myfunct,lambda0,options);

Please what am I doing wrong?

Cheers.

You can think of your watch list as threads that you have bookmarked.

You can add tags, authors, threads, and even search results to your watch list. This way you can easily keep track of topics that you're interested in. To view your watch list, click on the "My Newsreader" link.

To add items to your watch list, click the "add to watch list" link at the bottom of any page.

To add search criteria to your watch list, search for the desired term in the search box. Click on the "Add this search to my watch list" link on the search results page.

You can also add a tag to your watch list by searching for the tag with the directive "tag:tag_name" where tag_name is the name of the tag you would like to watch.

To add an author to your watch list, go to the author's profile page and click on the "Add this author to my watch list" link at the top of the page. You can also add an author to your watch list by going to a thread that the author has posted to and clicking on the "Add this author to my watch list" link. You will be notified whenever the author makes a post.

To add a thread to your watch list, go to the thread page and click the "Add this thread to my watch list" link at the top of the page.

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

The newsgroups are a worldwide forum that is open to everyone. Newsgroups are used to discuss a huge range of topics, make announcements, and trade files.

Discussions are threaded, or grouped in a way that allows you to read a posted message and all of its replies in chronological order. This makes it easy to follow the thread of the conversation, and to see what’s already been said before you post your own reply or make a new posting.

Newsgroup content is distributed by servers hosted by various organizations on the Internet. Messages are exchanged and managed using open-standard protocols. No single entity “owns” the newsgroups.

There are thousands of newsgroups, each addressing a single topic or area of interest. The MATLAB Central Newsreader posts and displays messages in the comp.soft-sys.matlab newsgroup.

**MATLAB Central**

You can use the integrated newsreader at the MATLAB Central website to read and post messages in this newsgroup. MATLAB Central is hosted by MathWorks.

Messages posted through the MATLAB Central Newsreader are seen by everyone using the newsgroups, regardless of how they access the newsgroups. There are several advantages to using MATLAB Central.

**One Account**

Your MATLAB Central account is tied to your MathWorks Account for easy access.

**Use the Email Address of Your Choice**

The MATLAB Central Newsreader allows you to define an alternative email address as your posting address, avoiding clutter in your primary mailbox and reducing spam.

**Spam Control**

Most newsgroup spam is filtered out by the MATLAB Central Newsreader.

**Tagging**

Messages can be tagged with a relevant label by any signed-in user. Tags can be used as keywords to find particular files of interest, or as a way to categorize your bookmarked postings. You may choose to allow others to view your tags, and you can view or search others’ tags as well as those of the community at large. Tagging provides a way to see both the big trends and the smaller, more obscure ideas and applications.

**Watch lists**

Setting up watch lists allows you to be notified of updates made to postings selected by author, thread, or any search variable. Your watch list notifications can be sent by email (daily digest or immediate), displayed in My Newsreader, or sent via RSS feed.

- Use a newsreader through your school, employer, or internet service provider
- Pay for newsgroup access from a commercial provider
- Use Google Groups
- Mathforum.org provides a newsreader with access to the comp.soft sys.matlab newsgroup
- Run your own server. For typical instructions, see: http://www.slyck.com/ng.php?page=2