solving double equation with random data with regress

1 回表示 (過去 30 日間)
fima v
fima v 2020 年 3 月 5 日
回答済み: Star Strider 2020 年 3 月 5 日
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)]);

回答 (1 件)

Star Strider
Star Strider 2020 年 3 月 5 日
See my Answer to your closely related Question.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by