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: cell2matPad.m
    path of file: ./repos/bnt/KPMtools
    
    the code of the file until where you have to start completion: function data2 = cell2matPad(data)
% data{f}(y,x,b) - each frame can have a different size (can can even be empty)
% data2(y,x,b,f) = zero padded version


    
function data2 = cell2matPad(data)
% data{f}(y,x,b) - each frame can have a different size (can can even be empty)
% data2(y,x,b,f) = zero padded version

Nframes = length(data);
Nbands = -inf;
nr = -inf; nc = -inf;
for f=1:Nframes
  if isempty(data{f}), continue; end