Code covered by the BSD License  

Highlights from
Brick Toolbox

image thumbnail
from Brick Toolbox by Thomas Deneux
The Brick Toolbox is a set of utility functions for Matlab.

fn_coerce

fn_coerce

y = fn_coerce(x,m,M) is a shortcut for y = min(max(x,m),M);

Contents

Example

y = fn_coerce(1:10,3,6)
y =

     3     3     3     4     5     6     6     6     6     6

Source

Thomas deneux

Copyright 2002-2012

Contact us