solving double equation with random data with regress

1 visualización (últimos 30 días)
fima v
fima v el 5 de Mzo. de 2020
Respondida: Star Strider el 5 de Mzo. de 2020
Hello,i am trying to find the best values of "eT" and "e" for m5 and m10 equations.
I ran the following code, i assume the by doing the commang as follows
regress([m10;m5],[v1;v2])
which estimates both m10 and m5 using v1 and v2 .(As shown in the code bellow)
my goal is to extact the best values for "eT" and "e" in m10 and m5 equations using B(1) and B(2) result coeeficients
so by theory i have two equations
B(1)*v1 which is B(1)*(2*eT+3*e)=m10
B(2)*(4*eT+5*e)=m5
but m10 and m5 are vectors of random data ,which m10 m5 cells to choose to get a good aproximation for "eT" and "e"?
Thanks.
e=0.001;
T=10;
eT=e*T;
coeff_1 = 0.05;
coeff_2 = 0.07;
n=5;
m10 = 2*eT+3*e + coeff_1*randn(n,1);
m5 = 4*eT+5*e + coeff_2*randn(n,1);
[B,BINT,R] = regress([m10;m5],[repmat([2,3],n,1);repmat([4,5],n,1)]);

Respuestas (1)

Star Strider
Star Strider el 5 de Mzo. de 2020
See my Answer to your closely related Question.

Categorías

Más información sobre Linear and Nonlinear Regression 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!

Translated by