Home > src > BN_pol_rec > functions > inMatrix.m

inMatrix

PURPOSE ^

Looks if index (x,y) is inside Matrix

SYNOPSIS ^

function [bool] = inMatrix(Matrix, x, y)

DESCRIPTION ^

Looks if index (x,y) is inside Matrix

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 function [bool] = inMatrix(Matrix, x, y)
0003 %Looks if index (x,y) is inside Matrix
0004 bool = 0;
0005 if (x <= 0)||(y <= 0) 
0006     return;
0007 end;
0008 [maxX, maxY, maxZ] = size(Matrix); 
0009 if ( x > maxX ) || ( y > maxY )
0010     return;
0011 end;
0012 bool = 1;

Generated on Wed 16-Mar-2005 09:17:47 by m2html © 2003