Skip to content

Commit

Permalink
one can use ~ to ignore fluence output in octave, not in matlab
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jan 26, 2022
1 parent d45f084 commit 87a310e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mcxlab/mcxlab.m
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,14 @@
end
end


% detect [~,...]=mcxlab() in Octave. unfortunately matlab does not have isargout()
if(nargout>=1 && exist('isargout','builtin') && isargout(1)==0)
for i=1:length(varargin{1})
varargin{1}(i).issave2pt=0;
end
end

if(useopencl==0)
[varargout{1:max(1,nargout)}]=mcx(varargin{1});
else
Expand Down Expand Up @@ -444,7 +452,6 @@
end

if(nargout>=2)

for i=1:length(varargout{2})
if((~isfield(cfg(i),'savedetflag')) || ((isfield(cfg(i),'savedetflag')) && isempty(cfg(i).savedetflag)))
cfg(i).savedetflag='DP';
Expand Down

0 comments on commit 87a310e

Please sign in to comment.