summaryrefslogtreecommitdiff
path: root/413/CH2/EX2.3/Example_2_3.sce
blob: b3d1a750303f1fe46e37009e55650c82fafe22ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Compute 1-, 2-, inf norms of the vector x, if x=[1.25, 0.02, -5.15, 0]
clearglobal()
clc;
x=[1.25 0.02 -5.15 0]
printf('x is')
disp(x)
printf('First Norm of x is')
disp(norm(x,1))
printf('Second Norm of x is')
disp(norm(x,2))
printf('infinite Norm of x is')
disp(norm(x,'inf'))