TABLE OF CONTENTS


::pwtk::norm

SYNOPSIS

proc ::pwtk::norm {v} {

PURPOSE

Return the size (norm) of an N-dimensional vector.

EXAMPLE

      ::pwtk::norm {1.0 2.0 0.0}

SOURCE

    set sum 0.0
    foreach c $v {
        set sum [expr $sum + $c*$c]
    }
    return [expr sqrt($sum)]
}