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: adimat_mtimes_dv.m
    path of file: ./repos/d2d/arFramework3/ThirdParty/StrucID/adimat/vector_directderivs
    
    the code of the file until where you have to start completion: % function d_res = adimat_mtimes_dv(d_A, B)
%
% Matrix multiply derivative object d_A times B.
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing   
%                     TU Darmstadt
function d_res = adimat_mtimes_dv(d_A, B
    
function d_res = adimat_mtimes_dv(d_A, B)
%
% Matrix multiply derivative object d_A times B.
%
% Copyright 2012 Johannes Willkomm, Institute for Scientific Computing   
%                     TU Darmstadt
function d_res = adimat_mtimes_dv(d_A, B)
  sz1 = size(d_A);
  if length(sz1) > 2
    p = sz1(3);
  else
    p = 1;
  end