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_times.m
    path of file: ./repos/mtt/libs/tensorlab
    
    the code of the file until where you have to start completion: function [x,state] = struct_times(z,task,cnst)
%STRUCT_TIMES Times.

    
function [x,state] = struct_times(z,task,cnst)
%STRUCT_TIMES Times.
%   [x,state] = struct_times(z,[],cnst) computes x as
%   bsxfun(@times,z,cnst). If z and cnst are of the same size, this is
%   equivalent to x = z.*cnst. The structure state stores information which
%   is reused in computing the right and left Jacobian-vector products.
%
%   struct_times(z,task,cnst) computes the right or left Jacobian-vector
%   product of this transformation, depend