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: display_slices.m
    path of file: ./repos/CanlabCore/CanlabCore/@image_vector
    
    the code of the file until where you have to start completion: function [whsl, plate] = display_slices(dat, varargin)
% Creates 3 separate montage views - ax, cor, sagg in a special figure window
%
% - By default, a figure with axi
    
function

% function vdat = eliminate_empty_areas(vdat)
% % Eliminate empty areas of image
% % ------------------------------------------------------------------------
% % this will mess up conversion to voxel coords from mm if empty slices!
% % turn off in direction of variation
% 
%     nullvox = vdat == 0 | isnan(vdat);
%     bottom = all(nullvox, 3);
%     
%         nullx = squeeze(all(bottom, 2));
%         vdat(nullx, :, :) = [];
%     
%         nully = squeeze(all(bottom, 1));
%         vdat(:, nully, :) = [];
%     
%         side = squeeze(all(nullvox, 1));
%         nullz = squeeze(all(side, 1));
%         vdat(:, :, nullz) = [];
%         
% end