function [] = checkparcs(prmin,prminname)

% default parameters
prm = defparcs(prminname);


% valid parameters
valid = fieldnames(prm);


f = fieldnames(prmin);
for i = 1 : numel(f)
    if ~ismember(f{i},valid)
        error(['Wrong parameter setting for ' prminname ': ' f{i} ' is not allowed']);
    end;
end
