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: km_memfill.m
    path of file: ./repos/kmbox/lib
    
    the code of the file until where you have to start completion: function x_mem = km_memfill(x,L)
% KM_MEMFILL buffers a signal vector into a matrix of data frames
% Input:  - x: data vector

    
function x_mem = km_memfill(x,L)
% KM_MEMFILL buffers a signal vector into a matrix of data frames
% Input:  - x: data vector
%         - L: number of frames
% Output: - x_mem: matrix of buffered data frames
% USAGE: x_mem = km_memfill(x,L)
%
% Author: Steven Van Vaerenbergh (steven.vanvaerenbergh at unican.es) 2015.
%
% This file is part of the Kernel Methods Toolbox for MATLAB.
% https://github.com/steven2358/kmbox

N = length(x);

x_mem = zeros(N,L);
for i=1:L,
    x_mem(i:N,i) = x(1:N-i+1);
end