How to evaluate a function?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Explorer
el 9 de Feb. de 2016
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 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!