I am currently trying to use the Particle Swarm Optimisation to find out the optimum value of two variables. This is my code
f = @(x)per_dif(adam_im,adam_count,x(1),x(2)); %FUNCTION
lb = [0.5,1]; %LOWER BOUND
ub = [1,20]; %UPPER BOUND
x = particleswarm(f,2, lb,ub); %PSO
This goves me one result, I want to iterate the process multiple times to get a more accurate result. to do so , I was thinking of usng the bootsrp function that will reshuflle my data. I tried the following
f = @(x)per_dif(adam_im,adam_count,x(1),x(2)); %FUNCTION
lb = [0.5,1]; %LOWER BOUND
ub = [1,20]; %UPPER BOUND
fun = @(x)particleswarm(f,2, lb,ub); %FUNCTION OF PSO
nboot = 1000
bootstat = bootstrp(nboots,fun,adam_im,adam_count);
I get the following error 'Too many input arguments.' Yet I don't know how to get around this, any ideas would be appreciated