How to solve a system of equations involving distribution?

 採用された回答

Amin Zargar
Amin Zargar 2011 年 12 月 26 日

0 投票

this worked:
F = [gamcdf(6.63,x(1),x(2))-0.4;
gamcdf(8.89,x(1),x(2))-0.6];
x0 = [2; 0.8];
options=optimset('Display','iter');
[x,fval] = fsolve(@SPI05,x0,options)
spasiba Andrei !

1 件のコメント

Walter Roberson
Walter Roberson 2011 年 12 月 26 日
Okay, but what do the 6.63 and 8.89 have to do with the requirements to use 3.01 and 4.63 ? And what is SPI05 ?
Also, please cross-check the solutions. When I was testing here, I found that expressing the solution in that form (as a difference), allowed an infinite number of solutions in which the gamcdf() values equations were both wrong by the same amount.

サインインしてコメントする。

その他の回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2011 年 12 月 26 日

0 投票

EDIT [20:23MSD 26.12.2011]:
fh1 = @(x)[gamcdf(3.01,x(1),x(2));gamcdf(4.63,x(1),x(2))] - [.4;.6];
out = fsolve(fh1,[1;1])
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>
out =
1.6466
2.8322

2 件のコメント

Amin Zargar
Amin Zargar 2011 年 12 月 26 日
Hi Andrei, I get this answer ..
Warning: Matrix is singular, close to singular or badly scaled.
Results may be inaccurate. RCOND = NaN.
> In optim\private\dogleg at 72
In optim\private\trustnleqn at 186
In fsolve at 377
No solution found.
fsolve stopped because the problem appears to be locally singular.
<stopping criteria details>
Walter Roberson
Walter Roberson 2011 年 12 月 26 日
Amin, which MATLAB version are you using?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by