Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!69.28.186.77.MISMATCH!hwmpeer03.lga!news.highwinds-media.com!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call another function!
References: <g0hsbt$bvj$1@fred.mathworks.com>
Message-ID: <muyfxsifkco.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:2dgx2JY1mEkYxFxJyxOtsP09jFo=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 38
Date: Fri, 16 May 2008 09:29:27 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1210943915 155.34.163.114 (Fri, 16 May 2008 09:18:35 EDT)
NNTP-Posting-Date: Fri, 16 May 2008 09:18:35 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:468837


"Erik Andersson" <annerk02@student.umu.se> writes:

>> 
>> I think your flux capacitor overloaded the triple value 
> of 
>> the third exigency.  You might want to uplink with the 
>> fluid portion of the apogee.
>> 
>> Or....post your error message.  Whichever is easier.
>>
>
> This is what i get:
>
> ??? Error using ==> load
> Argument must contain a string.
>
> Error in ==> trend at 3
> V=load(x);
>
> Error in ==> taborttrend at 4
> trend(x) 
>
> x in this case I want to be my vector V created in the 
> function taborttrend

If you load your data in the outer function (taborttrend), then you do
not need to load the data inside your trend function.  I would think you
want your trend function to take as an input the data itself.  That
means, define the function as:

function <whatever your output variable is> = trend(V)

and eliminate the V=load(x) line.

Your taborttrend function has already done the V=load(x), so you can
then simply pass V to the "trend" function, like you are currently doing.

-Peter