vecnorm

PURPOSE ^

Vectorwise norm: overload for matlab pre 2017b

SYNOPSIS ^

function out = vecnorm(x, p, dim)

DESCRIPTION ^

 Vectorwise norm: overload for matlab pre 2017b

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function out = vecnorm(x, p, dim)
0002 % Vectorwise norm: overload for matlab pre 2017b
0003 if nargin<2; p=2;   end
0004 if nargin<3; dim=1; end
0005 
0006 y = sum(x.^p, dim);
0007 out = y.^(1/p);

Generated on Fri 30-Dec-2022 19:44:54 by m2html © 2005