perim_curve

PURPOSE ^

PERIM_CURVE -

SYNOPSIS ^

function l=perim_curve(x,y)

DESCRIPTION ^

PERIM_CURVE - 

   This function returns the length of a curve described by x and y.

   Usage:
      l=perim_curve(x,y)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function l=perim_curve(x,y)
0002 %PERIM_CURVE -
0003 %
0004 %   This function returns the length of a curve described by x and y.
0005 %
0006 %   Usage:
0007 %      l=perim_curve(x,y)
0008 
0009 l=0;
0010 for n=1:length(x)-1,
0011    l=l+sqrt( (x(n)-x(n+1))^2+(y(n)-y(n+1))^2 );
0012 end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003