solving double equation with random data with regress
1 次查看(过去 30 天)
显示 更早的评论
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)]);
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!