function display(elemmatrix)
%DISPLAY - displays the fields of an elemmatrix 
%
%   echo function for 'elemmatrix' class

disp(sprintf('\n%s = \n',inputname(1)));

if ~isnan(elemmatrix.nrows),
	for i=1:elemmatrix.nrows,

		disp(sprintf('   row: %i',i));
		disp(sprintf('   local_row_index local_col_index global_row_index global_col_index     value\n'));

		for j=1:elemmatrix.nrows,
			disp(sprintf('   %8i %16i %16i %16i %16g\n', i, j, elemmatrix.row_indices(i),elemmatrix.row_indices(j),elemmatrix.terms(i,j)));
		end
	end
else
	disp('elemmatrix object is empty');
end
