Function rc_vector_norm#
- Defined in File vector.h 
Function Documentation#
- 
double rc_vector_norm(rc_vector_t v, double p)#
- Returns the vector norm defined by sum(abs(v)^p)^(1/p), where p is any positive real value. - Just like the matlab norm(v,p) function. - Most common norms are the 1 norm which gives the sum of absolute values of the vector and the 2-norm which is the square root of sum of squares. for infinity and -infinity norms see rc_vector_max and rc_vector_min - Parameters:
- v – [in] User’s vector struct 
- p – [in] Which norm to use. Positive real values only. 
 
- Returns:
- vector norm. Prints error message and returns -1.0f on error.