Skip to content
Snippets Groups Projects
Commit 13526bcb authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Octave now has the same graphical waitbar as MATLAB (for MCMC progress)

parent d03cc565
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ if nargout ...@@ -43,7 +43,7 @@ if nargout
end end
if ~whoiam if ~whoiam
if isoctave || options_.console_mode if options_.console_mode
if init if init
diary off; diary off;
running_text = varargin{1}; running_text = varargin{1};
...@@ -52,13 +52,9 @@ if ~whoiam ...@@ -52,13 +52,9 @@ if ~whoiam
elseif nargin>2 elseif nargin>2
running_text = varargin{2}; running_text = varargin{2};
end end
if isoctave
printf([running_text,' %3.f%% done\r'], prctdone*100);
else
s0=repmat('\b',1,length(newString)); s0=repmat('\b',1,length(newString));
newString=sprintf([running_text,' %3.f%% done'], prctdone*100); newString=sprintf([running_text,' %3.f%% done'], prctdone*100);
fprintf([s0,'%s'],newString); fprintf([s0,'%s'],newString);
end
else else
if nargout if nargout
h = waitbar(prctdone,varargin{:}); h = waitbar(prctdone,varargin{:});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment