Hello
I solved it by myself. Here is the answer if anyone is interested later on.
clc,clear
% y d1 d2 d3
A = [
55 535 1269 1498
103 1268 2387 1500
101 1055 3468 2999
106 983 3844 3000
67 541 2352 3000
100 983 3942 3750
107 955 4663 4499
84 561 3497 4500
];
y = A(:,1);
d1 = A(:,2);
d2 = A(:,3);
d3 = A(:,4);
Starting=[2 0.2 1.5 -0.5]';
options=optimset('Display','iter');
Estimates=fminsearch(@myfit,Starting,options,[d1 d2 d3],y);
% To check the fit
plot(d3,y,'*')
hold on
plot(n,Estimates(1)*d1.^(0.5*Estimates(2)).*d2.^(0.5*Estimates(3)).*d3.^Estimates(4),'r *')
and the function myfit
function sse=myfit(params,A,Actual_Output)
d1 = A(:,1);
d2 = A(:,2);
d3 = A(:,3);
k1 = params(1);
k2 = params(2);
k3 = params(3);
k4 = params(4);
Fitted_Curve=k1.*d1.^(0.5*k2).*d2.^(0.5*k3).*d3.^k4
Error_Vector=Fitted_Curve - Actual_Output;
sse=sum(Error_Vector.^2);
this works fine, is there any other better way to solve this if i have alot of data?