Path: news.mathworks.com!not-for-mail
From: "Steve " <steveDEL.bachmeierDEL@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ceiling or floor block
Date: Sat, 1 Sep 2007 14:16:27 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <fbbs7q$2re$1@fred.mathworks.com>
References: <fbafe4$ngu$1@fred.mathworks.com> <fbam82$1sf$1@fred.mathworks.com>
Reply-To: "Steve " <steveDEL.bachmeierDEL@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1188656187 2926 172.30.248.37 (1 Sep 2007 14:16:27 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 1 Sep 2007 14:16:27 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1034320
Xref: news.mathworks.com comp.soft-sys.matlab:426580



Thank you, but is there a Simulink block that will do this 
automatically?  Not a big deal, but just curious.  Thanks.

"us " <us@neurol.unizh.ch> wrote in message <fbam82
$1sf$1@fred.mathworks.com>...
> 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