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: mlpClass.m
    path of file: ./repos/PRMLT/chapter05
    
    the code of the file until where you have to start completion: function [model, L] = mlpClass(X, y, k, lambda)
% Train a multilayer perceptron neural network for multiclass classification with backpropagation
% logistic activation function is used.
% Input:

    
function [model, L] = mlpClass(X, y, k, lambda)
% Train a multilayer perceptron neural network for multiclass classification with backpropagation
% logistic activation function is used.
% Input:
%   X: d x n data matrix
%   y: 1 x n label vector
%   k: T x 1 vector to specify number of hidden nodes in each layer
%   lambda: regularization parameter
% Ouput:
%   model: model structure
%   L: (regularized cross entropy) loss
% Written by Mo Chen (sth4nth@gmail.com).
if nargin < 4
    lambda = 1e-2;
end