Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: movavg   Too many output arguments.
Date: Tue, 2 Oct 2012 23:13:07 +0000 (UTC)
Organization: HSBC
Lines: 41
Message-ID: <k4fse3$1sf$1@newscl01ah.mathworks.com>
References: <k4dobb$m2e$1@newscl01ah.mathworks.com> <a7f784d9-2a35-4c35-972a-b198b937b8ce@googlegroups.com> <k4ds22$dek$1@speranza.aioe.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1349219587 1935 172.30.248.47 (2 Oct 2012 23:13:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 2 Oct 2012 23:13:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2921053
Xref: news.mathworks.com comp.soft-sys.matlab:779743

You are correct!!  Thanks for pointing that out to me!!


dpb <none@non.net> wrote in message <k4ds22$dek$1@speranza.aioe.org>...
> On 10/1/2012 10:57 PM, TideMan wrote:
> ...
> 
> >>
> >> Everything works fine up until this line:
> >>
> >>      [~,~,~,sharpes(m)] = movavg(Close,5,20,'e');
> >>
> >> I get the following error when I run the code through the debugger:
> >>
> >> Debugging
> >>
> >> 1   sharpes = nan(100,1);
> >>
> >> Error using movavg
> >>
> >> Too many output arguments.
> >>
> >> Error in Debugging (line 4)
> >>
> >>      [~,~,~,sharpes(m)] = movavg(Close,5,20,'e');
> >>
> >> I know the movavg function takes 4 arguments; I cant tell what
> >> the  problem is here. ...
> 
>  From the doc for MOVAVG()...
> 
> Syntax
> 
> [Short, Long] = movavg(Asset, Lead, Lag, Alpha)
> 
> The message says "Too many _output_ arguments"; not too many inputs...
> 
> You've coded for four (albeit three tossed, but still four positional) 
> outputs whereas the function returns only two...
> 
> --