Home > GLMdenoise > utilities > mod2.m

mod2

PURPOSE ^

function f = mod2(x,y)

SYNOPSIS ^

function f = mod2(x,y)

DESCRIPTION ^

 function f = mod2(x,y)

 <x> is a matrix
 <y> is a number

 returns mod(x,y) except that 0 is returned as y.

 example:
 mod2(6,3)==3

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f = mod2(x,y)
0002 
0003 % function f = mod2(x,y)
0004 %
0005 % <x> is a matrix
0006 % <y> is a number
0007 %
0008 % returns mod(x,y) except that 0 is returned as y.
0009 %
0010 % example:
0011 % mod2(6,3)==3
0012 
0013 f = mod(x,y);
0014 f(f==0) = y;

Generated on Fri 01-Aug-2014 12:03:17 by m2html © 2005