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: bound_update.m
    path of file: ./repos/microshift_compression/verilog code/matlab_files/Toolkits
    
    the code of the file until where you have to start completion: function [upperbound, lowerbound] = bound_update(upperbound, lowerbound, I, shift)
% upperbound & lowerbound update for decompression
% upperbound array
% lowerbound arry
% I: subimage for updating bounds
% shift: shift value for the present subimage


[height, width] = size(I);
w = 32;

    
function [upperbound, lowerbound] = bound_update(upperbound, lowerbound, I, shift)
% upperbound & lowerbound update for decompression
% upperbound array
% lowerbound arry
% I: subimage for updating bounds
% shift: shift value for the present subimage


[height, width] = size(I);
w = 32;
for x = 1:height
    for y = 1:width
        ub_temp = I(x,y) + w - shift;
        lb_temp = I(x,y) - shift;
        ub = upperbound(x,y) + w - shift;
        lb = lowerbound(x,y) - shift;
        if ub_temp >= lb && lb_temp <= ub
            if ub_temp < ub
                upperbound(x,y) = ub_temp;
            end