norm
norm(x)
norm(x, p)
Calculate the norm of a number, vector or matrix.
Try it yourself:
$1 | abs(-3.5)
| |
$2 | norm(-3.5)
| |
$3 | norm(3 - 4i)
| |
$4 | norm([1, 2, -3], Infinity)
| |
$5 | norm([1, 2, -3], -Infinity)
| |
$6 | norm([3, 4], 2)
| |
$7 | norm([[1, 2], [3, 4]], 1)
| |
$8 | norm([[1, 2], [3, 4]], "inf")
| |
$9 | norm([[1, 2], [3, 4]], "fro")
|