scf - Set current figure, without making it visible. This function is useful in batches where figures must remain invisible. It is equivalent to figure(h) but does not make h visible. USAGE scf(h) h figure handle SEE ALSO See also Hide, sca, StartBatch.
0001 %scf - Set current figure, without making it visible. 0002 % 0003 % This function is useful in batches where figures must remain invisible. It 0004 % is equivalent to figure(h) but does not make h visible. 0005 % 0006 % USAGE 0007 % 0008 % scf(h) 0009 % 0010 % h figure handle 0011 % 0012 % SEE ALSO 0013 % 0014 % See also Hide, sca, StartBatch. 0015 % 0016 0017 % Copyright (C) 2013 by Michaƫl Zugaro 0018 % 0019 % This program is free software; you can redistribute it and/or modify 0020 % it under the terms of the GNU General Public License as published by 0021 % the Free Software Foundation; either version 3 of the License, or 0022 % (at your option) any later version. 0023 0024 function scf(h) 0025 0026 % Check number of parameters 0027 if nargin < 1, 0028 error('Incorrect number of parameters (type ''help <a href="matlab:help scf">scf</a>'' for details).'); 0029 end 0030 0031 % Check parameters 0032 if ~ishandle(h) || ~strcmp(get(h,'type'),'figure'), 0033 error('Incorrect figure handle (type ''help <a href="matlab:help scf">scf</a>'' for details).'); 0034 end 0035 0036 set(0,'CurrentFigure',h);