I have written a code by taking an example for which the final answer is known. But it is not giving the numerical values and gives expressions instead. Can anybody help me out?
v_mean = 3.089; v_sq_mean = 18.344; v_cu_mean = 191.042; v_min = 0; v_max = 17;
syms x a b c d
F1 = int(exp(-a-(b.*x)-(c.*x.^2)-(d.*x.^3)),v_min,v_max) - 1;
F2 = int(x.*(exp(-a-(b.*x)-(c.*x.^2)-(d.*x.^3))),v_min,v_max) - v_mean;
F3 = int((x.^2).*exp(-a-(b.*x)-(c.*x.^2)-(d.*x.^3)),v_min,v_max) - v_sq_mean;
F4 = int((x.^3).*exp(-a-(b.*x)-(c.*x.^2)-(d.*x.^3)),v_min,v_max) - v_cu_mean;
J11 = diff(F1,a);
J12 = diff(F1,b);
J13 = diff(F1,c);
J14 = diff(F1,d);
J21 = diff(F2,a);
J22 = diff(F2,b);
J23 = diff(F2,c);
J24 = diff(F2,d);
J31 = diff(F3,a);
J32 = diff(F3,b);
J33 = diff(F3,c);
J34 = diff(F3,d);
J41 = diff(F4,a);
J42 = diff(F4,b);
J43 = diff(F4,c);
J44 = diff(F4,d);
abcd = zeros(4,1);
error=1; while error > 0.0001
a=abcd(1,1); b=abcd(2,1); c=abcd(3,1); d=abcd(4,1);
J = [vpa(J11) vpa(J12) vpa(J13) vpa(J14) vpa(J21) vpa(J22) vpa(J23) vpa(J24) vpa(J31) vpa(J32) vpa(J33) vpa(J34) vpa(J41) vpa(J42) vpa(J43) vpa(J44)];
J_inverse = inv(J);
F = [vpa(F1) vpa(F2) vpa(F3) vpa(F4)];
JF = (J_inverse)*F;
abcd = abcd - JF;
error = sum(JF)
end