필터 지우기
필터 지우기

How to evaluate a function?

조회 수: 1 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by