From: "John D'Errico" <>
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$>
References: <icbulh$440$>
Reply-To: "John D'Errico" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1290377764 24196 (21 Nov 2010 22:16:04 GMT)
NNTP-Posting-Date: Sun, 21 Nov 2010 22:16:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: comp.soft-sys.matlab:688808

Armin Mueller <> wrote in message <icbulh$440$>...
> 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:

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