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: disptable.m
    path of file: ./repos/bspm/dependencies
    
    the code of the file until where you have to start completion: function disptable(M, col_strings, row_strings, fmt, spaces)
% DISPTABLE Displays a matrix with per-column or per-row labels.
%
%   USAGE: disptable(M, col_strings, row_strings, fmt, spaces)
%
%   DISPTABLE(M, COL_STRINGS, ROW_STRINGS)
%   Displays matrix or vector M with per-column or per-row labels,
%   specified in COL_STRINGS and ROW_STRINGS, respectively. These can be
%   cell arrays of strings, or strings delimited by the pipe character (|).
%   Either COL_STRINGS or ROW_STRINGS can be ommitted or empty.
%   
%   DISPTABLE(M, COL_STRINGS, ROW_STRINGS, FMT, SPACES)
%   FMT is an optional format string or number of significant digits, as

    
function disptable(M, col_strings, row_strings, fmt, spaces)
% DISPTABLE Displays a matrix with per-column or per-row labels.
%
%   USAGE: disptable(M, col_strings, row_strings, fmt, spaces)
%
%   DISPTABLE(M, COL_STRINGS, ROW_STRINGS)
%   Displays matrix or vector M with per-column or per-row labels,
%   specified in COL_STRINGS and ROW_STRINGS, respectively. These can be
%   cell arrays of strings, or strings delimited by the pipe character (|).
%   Either COL_STRINGS or ROW_STRINGS can be ommitted or empty.
%   
%   DISPTABLE(M, COL_STRINGS, ROW_STRINGS, FMT, SPACES)
%   FMT is an optional format string or number of significant digits, as
%   used in NUM2STR. It can also be the string 'int', as a shorthand to
%   specify that the values should be displayed as integers.
%   SPACES is an optional number of spaces to separate columns, which
%   defaults to 1.
%   
%   Example:
%     disptable(magic(3)*10-30, 'A|B|C', 'a|b|c')
%   
%   Outputs:
%        A    B    C
%    a  50  -20   30
%    b   0   20   40
%    c  10   60  -10
%   
%   Author: Jo?o F. Henriques, April 2010


	%parse and validate inputs
    if nargin < 1, mfile_showhelp; return; end
	if nargin < 2, col_strings = []; end
	if nargin < 3, row_strings = []; end
	if nargin < 4, fmt = 4; end
	if nargin < 5, spaces = 2; end
	
	if strcmp(fmt, 'int'), fmt = '%.0f'; end  %shorthand for displaying integer values
	
	assert(ndims(M) <= 2, 'Can only display a vector or two-dimensional matrix.')
	
	num_rows = size(M,1);
	num_cols = size(M,2);
    
    if all([num_rows==num_cols isempty(col_strings)])
       col_strings = cellstr(num2str((1:num_cols)'));
       if size(row_strings, 1)==1, row_strings = row_strings'; end