I have to translate to C this code of matlab

       % take off the pads


1st and 2nd create 2 array, but I don t know how I have to delete it from rpad Mat object It can be something like(subtract every element)

        for(int i=1+pad;i<=rows-pad;i++){

          int a=(rows-pad)-(1+pad);