Hello,
I have a function that I am trying to minimise as follows
function x = kmean_per_dif_fit(img, adam)x0 = [80,10,1];tota = @(x)0;totb = 0;for i = 1:5 err = @(x)abs(round(sum(sum((abs(img{1} - x(1))<abs(img{1} - x(2))) == 1))/x(3))-adam(i)); tota = @(x)tota(x) + err(x); totb = totb + adam(i);enda = @(x)tota(x)/totb;x = fminsearch(a,x0)end
As you can see, i have three unknowns and I try to initialise them at x0 = [80,10,1]
The answers that I get yet, are not within my initilastions
316.1776 -1.1811 2.6955
any help would be appreciated!
Best Answer