Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Make function injective
Date: Sun, 21 Nov 2010 22:16:04 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 21
Message-ID: <icc5n4$nk4$1@fred.mathworks.com>
References: <icbulh$440$1@news2.rz.uni-karlsruhe.de>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1290377764 24196 172.30.248.35 (21 Nov 2010 22:16:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 21 Nov 2010 22:16:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:688808

Armin Mueller <arm.in@web.de> wrote in message <icbulh$440$1@news2.rz.uni-karlsruhe.de>...
> Dear NG,
> 
> I would like to calculate the inverse function of a (measured) curve 
> which should be strictly decreasing. However, the data is noisy and not 
> 100% perfect.
> 
> To fix the curve, I've written some lines of code that drop all points 
> that are increasing or level. However, I have the dim feeling that the 
> code could be shorter and more elegant. Any idea how?

For noisy data, use a smoothing tool that can handle
a monotonicity constraint. This capability is available
in my SLM tools. Find them here:

http://www.mathworks.com/matlabcentral/fileexchange/24443

SLM allows you to build curve fits using a huge variety
of constraints.

John