function [list,info,ilist]=loadexcept(fn,varargin)
% loadexcept <Load all but vars.>
% Usage:: [list,info,ilist]=loadexcept(fn,varargin)
%

% revision history:
% 07/08/99 Mark D. Shattuck <mds> loadexcept.m

%% Main

info=whos('-file',fn);
[NL,~]=size(info);

Nvar=length(varargin);

ilist=true(1,NL);

for nvar=1:Nvar
  tmp=strncmp(varargin{nvar},{info.name},length(varargin{nvar}));
  if(~isempty(tmp))
    ilist(tmp)=false;
  end
end

list={info(ilist).name};


