Hello, I am writing the following code to minimize the error between calculated values and experimental results:
K=[1 2 2.8 3.3 3.5 3.6]; %some data to test
v = sym('v',[1 2]);a = v(1); b = v(2);e=[1 2 3 4 5 6]eo=2for i=1:1:6 D(i)=@(v)a*(e(i)-eo)^b E(i)=e(i)*(1-D(i)); R(i)=(K(i)-E(i))^2;endRM=0for i=1:1:6 RM=RM+R(i)endRMS=(RM)^(1/2)v = [0.12 2];c=fminsearch(RMS,v)
Its showing error. Can you please help to solve the issue.
Best Answer