Skip to content

Commit

Permalink
get_stat.m: support for saving variables directory to the stat object…
Browse files Browse the repository at this point in the history
… in memory
  • Loading branch information
mortonne committed Jun 24, 2013
1 parent 149d5ba commit 178f3b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stats/get_stat.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
% along with EEG Analysis Toolbox. If not, see <http://www.gnu.org/licenses/>.

% load the variable
x = getfield(load(stat.file, name), name);
if isempty(stat.file) && isfield(stat, name)
x = getfield(stat, name);
else
x = getfield(load(stat.file, name), name);
end

% get the right index
if exist('index', 'var')
Expand Down

0 comments on commit 178f3b0

Please sign in to comment.