This is indeed a bug triggered by the odd number of slices. Add a slice of zeros to your iField after you read it with Read_DICOM to make it even. Something like
iField=padarray(iField, [ 0 0 1 0], 'post');
matrix_size(3)= matrix_size(3)+1;
You can remove the extra slice after the MEDI_L1 call to compute QSM.