Path: news.mathworks.com!not-for-mail
From: "someone " <someone@somewhere.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call another function!
Date: Thu, 15 May 2008 19:49:03 +0000 (UTC)
Organization: Mitre Corp
Lines: 42
Message-ID: <g0i43f$n5j$1@fred.mathworks.com>
References: <g0hsbt$bvj$1@fred.mathworks.com> <g0htfh$imr$1@fred.mathworks.com>
Reply-To: "someone " <someone@somewhere.net>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210880943 23731 172.30.248.35 (15 May 2008 19:49:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 May 2008 19:49:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2318
Xref: news.mathworks.com comp.soft-sys.matlab:468687


"Erik Andersson" <annerk02@student.umu.se> wrote in message 
<g0htfh$imr$1@fred.mathworks.com>...
> "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?

This is like saying, "I tried to walk, but I fell.  Why?"
There could be MANY reasons.

How do you know it didn't work?

What error message did you get?

What is the code in function trend?