Path: news.mathworks.com!not-for-mail
From: "Erik Andersson" <annerk02@student.umu.se>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call another function!
Date: Thu, 15 May 2008 17:56:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <g0htfh$imr$1@fred.mathworks.com>
References: <g0hsbt$bvj$1@fred.mathworks.com>
Reply-To: "Erik Andersson" <annerk02@student.umu.se>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210874161 19163 172.30.248.38 (15 May 2008 17:56:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 May 2008 17:56:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1374449
Xref: news.mathworks.com comp.soft-sys.matlab:468662


"Erik Andersson" <annerk02@student.umu.se> wrote in message 
<g0hsbt$bvj$1@fred.mathworks.com>...
> I've got the following function:
> 
> function taborttrend
> x=load('data.txt');
> V=diff(x,1);
> 
> Now a want to call another function lying in the same 
> directory as taborttrend.m named trend.m which has input 
x, 
> i.e trend(x). Now a want my differenced vektor V to be 
that 
> input x and that its done in the m-file taborttrend. How 
do 
> a get that?
> 
> Thanks for answers!

I've tried:

function taborttrend
 x=load('data.txt');
 V=diff(x,1);
 trend(V)

But it doesn't work. Why?