function loadfromdisk(m)
%MAN_PAGE_BEGIN
%
%   @purpose	Load data from disk for quicker subsequent access
%
%   @synopsis	loadfromdisk(m)
%   @description  get and cache data.
%
%   @see 
%
%MAN_PAGE_END

% By Antoine Duchateau. All Rights Reserved.
% Written: 31/05/99

if isempty(m.data) & ~isempty(m.filename) & ~strcmp(m.filename(1:6),'nofile'),
	f = load(m.filename);
	for i=1:length(m.variables),
		m.data = [m.data getfield(f,m.variables{i})];
	end
end

assignin('caller',inputname(1),m)
