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_blobs2vol.m
    path of file: ./repos/bspm/thirdparty/MIALAB/gipc1d/ipctb_spm5_files/@slover/private
    
    the code of the file until where you have to start completion: function vol = pr_blobs2vol(xyz,vals,mat)

    
function vol = pr_blobs2vol(xyz,vals,mat)
% takes XYZ matrix and values, returns SPM matrix vol struct
% FORMAT vol = pr_blobs2vol(xyz,vals,mat)
% 
% Inputs 
% xyz      - 3xN X Y Z coordinate matrix (in voxels)
% vals     - 1xN values, one per coordinate
% mat      - 4x4 voxel->world space transformation
% 
% Outputs
% vol      - vol struct, with matrix data 'imgdata' field
% 
% $Id: pr_blobs2vol.m,v 1.1 2005/04/20 15:05:00 matthewbrett Exp $
  
if nargin < 3
  error('Need XYZ, vals and mat');
end