i get a huge gap in my starting position between Dc and Dm and although they both go down in each itteration,still the gap is so huge that when one comes close to zero the other is still very large and i get error function of 6 at best,as shown in the photos bellow. What could be done to create more balance between Dc and Dm or make Dm to reduce faster ? Thanks.
my matlab code: x_data=[1:2*n]'; %2NX1
real_data=[m10;m5];%our data which we try to aproximate 2NX1
pred_m=[repmat([0.4238,-106.0187],n,1); repmat([0.2895,-69.7404],n,1)];%prediction matrices 2NX2
B=[t0,t1]';% coefficient for prediction matrices 2X1
h_pred=pred_m*B; %2NX2 X 2X1= 2NXY hipothesys vector prediction
E=(1/(n))*sum((real_data-h_pred).^2); %error function
if (E<0.01) break; end end