% FUNCTION CHECK_PARAM(REQUIRED_PARAM, GIVEN_PARAM)

function check_param(required_param, given_param)

aux = ismember(required_param, given_param);

if ~all(aux)
  s = sprintf('Some of the required parameters are missing:');
  v = required_param( ~aux );
  for a = 1:length( v )
    s = [ s sprintf( [ '\n  ' v{ a } ] ) ];
  end
  s = [ s sprintf( '\nAborted.') ];
  error( s );
end
