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: power.m
    path of file: ./repos/d2d/arFramework3/ThirdParty/StrucID/adimat/opt_derivclass/@adderiv
    
    the code of the file until where you have to start completion: function res= power(s1, s2)
%ADDERIV/POWER Elementwise power
%
% Copyright 2001-2004 Andre Vehreschild, Institute for Scientific Computing   

    
function res= power(s1, s2)
%ADDERIV/POWER Elementwise power
%
% Copyright 2001-2004 Andre Vehreschild, Institute for Scientific Computing   
%                     RWTH Aachen University
% This code is under development! Use at your own risk! Duplication,
% modification and distribution FORBIDDEN!


if isa(s2, 'adderiv')
   error('Exponent can not be active.'); 
else 
   res= adderiv(s1);

   if res.dims==1
      for i= 1: res.ndd
         res.deriv{i}= s1.deriv{i}.^ s2;
      end