Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e53g2000hsa.googlegroups.com!not-for-mail
From: Dave <davebrackett@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: attempt to execute script varargin as a function
Date: Mon, 1 Sep 2008 07:28:42 -0700 (PDT)
Organization: http://groups.google.com
Lines: 40
Message-ID: <d08c021f-a12c-40c8-a5cc-0383c38e3912@e53g2000hsa.googlegroups.com>
References: <g9gfe3$m54$1@fred.mathworks.com> <9f977ec1-2e3a-45b8-a6bd-fcb9238775fd@p25g2000hsf.googlegroups.com>
NNTP-Posting-Host: 131.231.138.20
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1220279323 9538 127.0.0.1 (1 Sep 2008 14:28:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 1 Sep 2008 14:28:43 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e53g2000hsa.googlegroups.com; posting-host=131.231.138.20; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; 
Xref: news.mathworks.com comp.soft-sys.matlab:488109



On Sep 1, 2:50=A0pm, woodch...@rochester.rr.com wrote:
> On Sep 1, 6:16=A0am, "Dave Brackett" <davebrack...@hotmail.com> wrote:
>
>
>
>
>
> > I have been trying to use the Hybrid Particle Swarm
> > Optimization function from the file exchange by Alexandros
> > Leontitsis:
>
> >http://www.mathworks.com/matlabcentral/fileexchange/loadFile
> > .do?objectId=3D6497&objectType=3Dfile
>
> > I am running this from within an m file but keep getting
> > the following error message:
>
> > ??? Attempt to execute SCRIPT varargin as a function:
> > C:\Program
> > Files\MATLAB\R2008a\toolbox\matlab\lang\varargin.m
>
> > Error in =3D=3D> main_vectorised at 160
> > =A0 =A0 options=3DhPSOoptions(varargin);
>
> > Anyone any ideas on how to avoid this problem? Thanks.
>
> What you need to show us, is how you called that
> tool.
>
> John- Hide quoted text -
>
> - Show quoted text -

ok, it was done like this where the functions are the hybrid pso from
the file exchange:

options=3DhPSOoptions(variable_range,varargin);
[x,fval,gfx,output]=3DhPSO(fitness_fcn,no_variables,options,varargin);

please ask if you need any more details. thanks. Dave