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: pr_volmaxmin.m
    path of file: ./repos/ExploreASL/External/SPMmodified/@slover/private
    
    the code of the file until where you have to start completion: function [mx,mn] = pr_volmaxmin(vol)
% Return max and min value in image volume
% FORMAT [mx,mn] = pr_volmaxmin(vol)
%
% Input
% vol      - image name or vol struct
%

    
function [mx,mn] = pr_volmaxmin(vol)
% Return max and min value in image volume
% FORMAT [mx,mn] = pr_volmaxmin(vol)
%
% Input
% vol      - image name or vol struct
%
% Outputs
% mx       - maximum
% mn       - minimum
%__________________________________________________________________________

% Matthew Brett
% $Id: pr_volmaxmin.m 6623 2015-12-03 18:38:08Z guillaume $

if nargin < 1
    error('Need volume to process');
end