フィルターのクリア

How to evaluate a function?

2 ビュー (過去 30 日間)
Max
Max 2016 年 2 月 9 日
編集済み: Stephen23 2016 年 2 月 9 日
Hello,
I would like to find values for three parameters that satisfy the following equation: R>=value (e.g.2)
R is the likelihood-ratio: L/L_LK
This is my source-code:
1a = [3850,4340,4760];
2a = [3300,3720,4080];
3a = [2750,3100,3400];
beta_hat =13.502152;
B_hat = 1861.328876;
C_hat=39.624407;
syms B C beta positive
L=1;
for j=1:length(1a)
L=L*((beta/(C*exp(B/393)))*((data_test_1a(j)/(C*exp(B/393)))^(beta-1))*exp(-((data_test_1a(j)/(C*exp(B/393)))^beta))*(beta/(C*exp(B/408)))*((data_test_2a(j)/(C*exp(B/408)))^(beta-1))*exp(-((data_test_2a(j)/(C*exp(B/408)))^beta))*(beta/(C*exp(B/423)))*((data_test_3a(j)/(C*exp(B/423)))^(beta-1))*exp(-((data_test_3a(j)/(C*exp(B/423)))^beta)));
end
L_LK= double(subs(L,[B,C,beta],[1861.328876,39.624407,13.502152]));
R=L/L_LK;
One possibility to do that is to hold two parameters constant and vary the 3rd one and so on.
But I don´t really know how to realize it in matlab.
Does somebody have an idea? Thanks in advance for all solutions.

回答 (1 件)

Explorer
Explorer 2016 年 2 月 9 日
1a = [3850,4340,4760]
It's a row vector and you can't name a row with "1a". Yes, you use a1.
So replace 1a with a1, 2a with a2 and 3a with a3.
  3 件のコメント
Explorer
Explorer 2016 年 2 月 9 日
編集済み: Explorer 2016 年 2 月 9 日
You welcome. If I have answered your question, please accept my answer.
Max
Max 2016 年 2 月 9 日
Unfortunately, that´s not the answer.Sorry.

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

カテゴリ

Help Center および 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