Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ceiling or floor block
Date: Sat, 1 Sep 2007 03:28:02 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 17
Message-ID: <fbam82$1sf$1@fred.mathworks.com>
References: <fbafe4$ngu$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1188617282 1935 172.30.248.35 (1 Sep 2007 03:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 1 Sep 2007 03:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:426553



Steve:
<SNIP does not like outliers...

one of the many solutions

% the data
     v=[-10:2:10];
     vmin=-5;
     vmax=5;
% the engine
     vo=v;
     vo(v>vmax)=vmax;
     vo(v<vmin)=vmin;
% the result
     [v;vo]

us