Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vidaurre committed Jan 16, 2025
1 parent 8378863 commit debca34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/analysis/getFuncConn.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
elseif is_diagonal
covmat = diag( hmm.state(k).Omega.Gam_rate / (hmm.state(k).Omega.Gam_shape-1) );
if ~isfield(hmm.state(k).Omega,'Gam_irate')
hmm.state(k).Omega.Gam_irate = 1 ./ hmm.state(k).Omega.Gam_irate;
hmm.state(k).Omega.Gam_irate = 1 ./ hmm.state(k).Omega.Gam_rate;
end
icovmat = diag( hmm.state(k).Omega.Gam_irate * (hmm.state(k).Omega.Gam_shape-1) );
else
Expand Down
8 changes: 8 additions & 0 deletions utils/internal/checkoptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,14 @@
elseif ~isfield(options,'covtype') && options.order>0, options.covtype = 'diag';
elseif ~isfield(options,'covtype') && ndim>1, options.covtype = 'full';
elseif ~isfield(options,'covtype'), options.covtype = 'diag';
elseif isfield(options,'covtype') && ...
~strcmp(options.covtype,'full') && ...
~strcmp(options.covtype,'sharedfull') && ...
~strcmp(options.covtype,'uniquefull') && ...
~strcmp(options.covtype,'diag') && ...
~strcmp(options.covtype,'shareddiag') && ...
~strcmp(options.covtype,'uniquediag')
error('Invalid value for option covtype: choose one of "full", "sharedfull", "diag" or "shareddiag"')
elseif (strcmp(options.covtype,'full') || strcmp(options.covtype,'sharedfull')) && ...
ndim==1 && length(options.embeddedlags)==1
warning('Covariance can only be diag or shareddiag if data has only one channel')
Expand Down

0 comments on commit debca34

Please sign in to comment.