diff --git a/swfiles/sw_status.m b/swfiles/sw_status.m index bf80b2203..3ff9b18c9 100644 --- a/swfiles/sw_status.m +++ b/swfiles/sw_status.m @@ -23,7 +23,7 @@ function sw_status(percent,varargin) return end -if nargin > 2 && ~isempty(varargin{2}) +if nargin > 2 && ~isempty(varargin{2}) && ~ischar(varargin{2}) fid = varargin{2}; else fid = swpref.getpref('tid',[]); diff --git a/swfiles/sw_version.m b/swfiles/sw_version.m index 8e6a40214..3c687affc 100644 --- a/swfiles/sw_version.m +++ b/swfiles/sw_version.m @@ -1,4 +1,4 @@ -function varargout = sw_version() +function outStr = sw_version() % returns the installed version of SpinW % % SW_VERSION() @@ -105,12 +105,12 @@ if any(revNum) ver0.Revision = num2str(revNum); end - varargout{1} = ver0; + outStr = ver0; else if isempty(fieldnames(verStruct)) - varargout{1} = ver0; + outStr = ver0; else - varargout{1} = verStruct; + outStr = verStruct; end end end