Home > src > BN_pol_rec > functions > mediumPoint.m

mediumPoint

PURPOSE ^

Returns medium point for input points

SYNOPSIS ^

function med = mediumPoint(p1, p2, p3)

DESCRIPTION ^

Returns medium point for input points

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002  function med = mediumPoint(p1, p2, p3)
0003  %Returns medium point for input points
0004  
0005  x = [p1(1) p2(1) p3(1)]';
0006  y = [p1(2) p2(2) p3(2)]';
0007  
0008  xm = sum(x)/length(x);
0009  ym = sum(y)/length(y);
0010  med = [xm ym];
0011  
0012 
0013

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