Курсовая работа: Розрахунок норм вектору
procedure multVectToNomb (var op1: vector; nomb: real);
var i: size;
begin
for i: =1 to nmax do op1 [i]: =op1 [i] *nomb;
end;
// ------------ - longOfVect - ------------------
function longOfVect (op1: vector): real;
var i: size; tmpVal: real;
begin
tmpVal: =0;
for i: =1 to nmax do tmpVal: =tmpVal+op1 [i] *op1 [i];
longOfVect: =sqrt (tmpVal);
end;
// --------- - multVectToVect - -----------------
function multVectToVect (op1,op2: vector): real;
var i: size; tmpVal: real;
begin
tmpVal: =0;
for i: =1 to nmax do tmpVal: =tmpVal+op1 [i] *op2 [i];
multVectToVect: =tmpVal;
end;
// ------------- - absSum - --------------------
function absSum (op1: vector): real;
var i: size; tmpVal: real;
begin
tmpVal: =0;
for i: =1 to nmax do tmpVal: =tmpVal+abs (op1 [i]);
absSum: =tmpVal;
end;