You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: generateTensions2Unitvectors.m
    path of file: ./repos/multiple-quadrotor-flexible-hose/matlab/utils/func_generators
    
    the code of the file until where you have to start completion: % function generateTensions2Unitvectors()
clear; close all;

n = 5;
max_derv = 2*n+4;

% defining symbol
    
function generateTensions2Unitvectors()
clear; close all;

n = 5;
max_derv = 2*n+4;

% defining symbols
% ----------------
syms normT real                 % tension and its norm
T = sym('T',[3,1],'real');      % tension
dT      = sym('dT', [3, max_derv],'real');   % tension derivatives
dnormT  = sym('dnormT', [max_derv,1], 'real'); % derivative of norms

% computing derivatives of the norm of the tension
% ------------------------------------------------
dnT_ = dot2(T,dT(:,1))./normT;

dnT = dnT_;
for i = 2:max_derv
    fprintf("performing %d th derivation of the norm\n", i);
    dnT = [dnT; jacobian(dnT(i-1), [normT; dnormT(1:i-1); T; reshape(dT(:,1:i-1), 3*(i-1), 1)])*[dnormT(1:i); reshape(dT(:,1:i),3*i,1)]];
end