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: add_blobs.m
    path of file: ./repos/bspm/thirdparty/MIALAB/gipc1d/ipctb_spm5_files/@slover
    
    the code of the file until where you have to start completion: function obj = add_blobs(obj, xyz, vals, mat, imgno)
% adds SPM blobs to img no 'imgno', as specified in 
% FORMAT obj = add_blobs(obj, xyz, vals, mat, imgno)
% 
% Inputs 
% XYZ  - 3xN voxel coordinates of N blob values
% vals - N blob intensity values
% mat  - 4x4 matrix specifying voxels -> mm
% imgno - slice overlay img number to add to (defaults last in object)
%

    
function obj = add_blobs(obj, xyz, vals, mat, imgno)
% adds SPM blobs to img no 'imgno', as specified in 
% FORMAT obj = add_blobs(obj, xyz, vals, mat, imgno)
% 
% Inputs 
% XYZ  - 3xN voxel coordinates of N blob values
% vals - N blob intensity values
% mat  - 4x4 matrix specifying voxels -> mm
% imgno - slice overlay img number to add to (defaults last in object)
%
% Outputs
% obj  - modified object
%
% $Id: add_blobs.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $

if nargin < 4
  error('Need all of object, xyz, vals, mat');
end