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: struct_band.m
    path of file: ./repos/lrslibrary/libs/+tensorlab
    
    the code of the file until where you have to start completion: function [x,state] = struct_band(z,task,size_mat,band)
%STRUCT_BAND Band matrix.

    
function [x,state] = struct_band(z,task,size_mat,band)
%STRUCT_BAND Band matrix.
%   [x,state] = struct_band(z,[],size_mat,band) generates a band matrix x
%   of size size_mat, where the diagonals band(1) to band(2) are filled
%   column by column with entries from the vector z. For example, if x is a
%   square matrix of order n, the vector z should have length
%   sum(n-abs(band(1):band(2))). The structure state stores information
%   which is reused in computing the right and left Jacobian-vector
%   products.
%
%   struct_band(z,task,size_mat,band) computes the right or left
%   Jacobian-vector product of this transformation, depend