Hi,Sam.Thanks for your good job.
I have a problem when I use the nonlinear contraint.'Problem is infeasible due to nonlinear constraints' occured.But I don't know why. Can you help me? Or anybody knows it can give me a hand. Thanks.

Hi,Sam. I have a problem to use PSO to find C=[c1,c2,c3,c4].The contraint is A*W=1,where A=[a b],W=[c1*exp(jc3),c2*exp(jc4)].How can I set Aeq. Thanks for your answer.

Dear Sam !
thank you very much for providing very nice optimizing toolbox .
in my optimization problem i have 4 optimizing parameter. i want to plot it with generation (generation vs var(1) ,generation vs var(2),generation vs var(3) etc ...)

I found something in one of your comments here. On 15 May 2013
"I've also made a small change to ensure that only feasible solutions are selected as global optima when the penalty-based constraint enforcement method is used."
What does this mean? We can obtain an relatively optimal result among all iterations? Is there an example of this kind of application. Or it is just set with options.ConstrBoundary = 'penalize' ? Thanks.

And another problem about population size and generation. I assigned this kind of value to these two variables.
f.option.PopulationSize = 500000; % Same to GA.
f.options.Generations = 1000 ;
But I always obtain the result like this:
rt2 =
x: [1.8990 0.9206 2.0019 -0.3474 -0.0901]
fval: -1.2477
exitflag: 3
output: [1x1 struct]
population: [40x5 double]
scores: [40x1 double]
data1: [50x5 double]
real_v: [1x50 double]
The population dimension is 40*5.
I called the function this way:
fitnessfcn = str2func('mytest');
options = fitnessfcn('init') ;
issue1 = options;
issue1.fitnessfcn = fitnessfcn;
issue1.nvars = 5;
issue1.options.DemoMode = 'fast' ;
[x,fval,exitflag,output,population,scores] = pso(issue1);

Comment only