필터 지우기
필터 지우기

solving double equation with random data with regress

조회 수: 3 (최근 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 CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by