particleswarm optimization in MATLAB

조회 수: 5 (최근 30일)
mohammed hussein
mohammed hussein 2016년 3월 14일
댓글: Walter Roberson 2016년 3월 15일
dear all i have an problem if any one can help me
when i used any example of particle swarm optimization , this example from help of particle swarm
fcn = @dejong5fcn;
nvars = 2;
lb = [-64 -64];
ub = [64 64];
[x,fval] = particleswarm(fcn,nvars,lb,ub)
it gives me this error i do not know why even though i have the particle swarm toolbox
Undefined function 'particleswarm' for input arguments of type 'function_handle'.
thank you
  댓글 수: 3
jgg
jgg 2016년 3월 14일
You also need to actually have the toolbox installed and as part of your license. The ver command should list your available toolboxes.
mohammed hussein
mohammed hussein 2016년 3월 14일
Thank you for answering Iam using MATALB 2015b full with optimization toolbox

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 3월 14일
particleswarm() is part of the Global Optimization Toolbox, not part of the Optimization Toolbox.
  댓글 수: 4
mohammed hussein
mohammed hussein 2016년 3월 15일
편집: Walter Roberson 2016년 3월 15일
it gives me
>> which -all particleswarm
C:\Program Files\MATLAB\R2015b\toolbox\globaloptim\globaloptim\particleswarm.m % Has no license available
but it was working before so why there is no license available
thank you very much for your helping
Walter Roberson
Walter Roberson 2016년 3월 15일
Were you using a Trial version? If so it might have expired.
Were you using a Student Version license obtained through a MOOC (Massive Open Online Course) ? If so then it might have expired.
Were you using a Student Version license under one of the Term options such as "9 months" or "1 year" ? If so then it might have expired.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle Swarm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by