Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail
From: heiko_marx@hotmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: attempt to execute script varargin as a function
Date: Mon, 1 Sep 2008 05:04:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 26
Message-ID: <a478e8d9-8ad2-4a3d-90cd-90179eec31be@p25g2000hsf.googlegroups.com>
References: <g9gfe3$m54$1@fred.mathworks.com>
NNTP-Posting-Host: 87.139.31.42
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1220270660 13829 127.0.0.1 (1 Sep 2008 12:04:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 1 Sep 2008 12:04:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p25g2000hsf.googlegroups.com; posting-host=87.139.31.42; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) 
X-HTTP-Via: 1.1 tux.sinus:3128 (Squid/2.2.STABLE5)
Xref: news.mathworks.com comp.soft-sys.matlab:488094



On 1 Sep., 12:16, "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.

Hi.

Do you have any input arguments in your function main_vectorised? Is
the variable varargin existing at this point in the code?

Heiko