Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!news.newsland.it!aioe.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: A few questions about using matlab
Date: Sun, 04 May 2008 08:20:36 -0500
Organization: Aioe.org NNTP Server
Lines: 31
Message-ID: <fvkdac$iqg$2@aioe.org>
References: <fvk68r$mct$1@fred.mathworks.com>
NNTP-Posting-Host: ehZcmyLBsRGqg549t04bvA.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
Xref: news.mathworks.com comp.soft-sys.matlab:466508


A wrote:
> Hi,
> 
> I'm trying to write and m-file and I'm having a few problems.
> 
> 1. How do I use a given value of x in functions?
> 
> Example, my function is fun(f,x). I input fun(ln(x),2) and
> it only gives me the derivative with the x, 1/x. I want the
> output to give me the derivative with the 2, 0.5.
> 
> This is how it looks like now:
> 
> Function out = fun(f,x)
> 
> out = diff(f,x);

You would need optional symbolic toolbox to manipulate algebraic 
expressions and derivatives thereof other than numerically.

diff() is a pointwise 1st-order difference approximation to the 
derivative of a numerical vector, _not_ a symbolic differentiator, sorry.


> 2. Do any of you have any idea what function would calculate
> the equation of the tangent for the given function f with a
> given dot x?

In the general case would be symbolic again (iiu the question)...

--