function statusbarHandles = statusbar(varargin)
%statusbar set/get the status-bar of Matlab desktop or a figure
%
% statusbar sets the status-bar text of the Matlab desktop or a figure.
% statusbar accepts arguments in the format accepted by the <a href="matlab:doc sprintf">sprintf</a>
% function and returns the statusbar handle(s), if available.
%
% Syntax:
% statusbarHandle = statusbar(handle, text, sprintf_args...)
%
% statusbar(text, sprintf_args...) sets the status bar text for the
% current figure. If no figure is selected, then one will be created.
% Note that figures with 'HandleVisibility' turned off will be skipped
% (compare <a href="matlab:doc findobj">findobj</a> & <a href="matlab:doc findall">findall</a>).
% In these cases, simply pass their figure handle as first argument.
% text may be a single string argument, or anything accepted by sprintf.
%
% statusbar(handle, ...) sets the status bar text of the figure
% handle (or the figure which contains handle). If the status bar was
% not yet displayed for this figure, it will be created and displayed.
% If text is not supplied, then any existing status bar is erased,
% unlike statusbar(handle, '') which just clears the text.
%
% statusbar(0, ...) sets the Matlab desktop's status bar text. If text is
% not supplied, then any existing text is erased, like statusbar(0, '').
%
% statusbar([handles], ...) sets the status bar text of all the
% requested handles.
%
% statusbarHandle = statusbar(...) returns the status bar handle
% for the selected figure. The Matlab desktop does not expose its
% statusbar object, so statusbar(0, ...) always returns [].
% If multiple unique figure handles were requested, then
% statusbarHandle is an array of all non-empty status bar handles.
%
% Notes:
% 1) The format statusbarHandle = statusbar(handle) does NOT erase
% any existing statusbar, but just returns the handles.
% 2) The status bar is 20 pixels high across the entire bottom of
% the figure. It hides everything between pixel heights 0-20,
% even parts of uicontrols, regardless of who was created first!
% 3) Three internal handles are exposed to the user (Figures only):
% - CornerGrip: a small square resizing grip on bottom-right corner
% - TextPanel: main panel area, containing the status text
% - ProgressBar: a progress bar within TextPanel (default: invisible)
%
% Examples:
% statusbar; % delete status bar from current figure
% statusbar(0, 'Desktop status: processing...');
% statusbar([hFig1,hFig2], 'Please wait while processing...');
% statusbar('Processing %d of %d (%.1f%%)...',idx,total,100*idx/total);
% statusbar('Running... [%s%s]',repmat('*',1,fix(N*idx/total)),repmat('.',1,N-fix(N*idx/total)));
% existingText = get(statusbar(myHandle),'Text');
%
% Examples customizing the status-bar appearance:
% sb = statusbar('text');
% set(sb.CornerGrip, 'visible','off');
% set(sb.TextPanel, 'Foreground',[1,0,0], 'Background','cyan', 'ToolTipText','tool tip...')
% set(sb, 'Background',java.awt.Color.cyan);
%
% % sb.ProgressBar is by default invisible, determinite, non-continuous fill, min=0, max=100, initial value=0
% set(sb.ProgressBar, 'Visible','on', 'Minimum',0, 'Maximum',500, 'Value',234);
% set(sb.ProgressBar, 'Visible','on', 'Indeterminate','off'); % indeterminate (annimated)
% set(sb.ProgressBar, 'Visible','on', 'StringPainted','on'); % continuous fill
% set(sb.ProgressBar, 'Visible','on', 'StringPainted','on', 'string',''); % continuous fill, no percentage text
%
% % Adding a checkbox
% jCheckBox = javax.swing.JCheckBox('cb label');
% sb.add(jCheckBox,'West'); % Beware: East also works but doesn't resize automatically
%
% Notes:
% Statusbar will probably NOT work on Matlab versions earlier than 6.0 (R12)
% In Matlab 6.0 (R12), figure statusbars are not supported (only desktop statusbar)
%
% Warning:
% This code heavily relies on undocumented and unsupported Matlab
% functionality. It works on Matlab 7+, but use at your own risk!
%
% Bugs and suggestions:
% Please send to Yair Altman (altmany at gmail dot com)
%
% Change log:
% 2007-May-04: Added partial support for Matlab 6
% 2007-Apr-29: Added internal ProgressBar; clarified main comment
% 2007-Apr-25: First version posted on MathWorks file exchange: <a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14773">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14773</a>
%
% See also:
% ishghandle, sprintf, findjobj (on the <a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14317">file exchange</a>)
% License to use and modify this code is granted freely without warranty to all, as long as the original author is
% referenced and attributed as such. The original author maintains the right to be solely associated with this work.
% Programmed and Copyright by Yair M. Altman: altmany(at)gmail.com
% $Revision: 1.0 $ $Date: 2007/04/25 16:43:24 $
warning off MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame
% Check for available Java/AWT (not sure if Swing is really needed so let's just check AWT)
if ~usejava('awt')
error('YMA:statusbar:noJava','statusbar only works on Matlab envs that run on java');
end
% Args check
if nargin < 1 | ischar(varargin{1}) %#ok for Matlab 6 compatibility
handles = gcf; % note: this skips over figures with 'HandleVisibility'='off'
else
handles = varargin{1};
varargin(1) = [];
end
% Ensure that all supplied handles are valid HG GUI handles (Note: 0 is a valid HG handle)
if isempty(handles) | ~all(ishandle(handles)) %#ok for Matlab 6 compatibility
error('YMA:statusbar:invalidHandle','invalid GUI handle passed to statusbar');
end
% Retrieve the requested text string (only process once, for all handles)
if isempty(varargin)
deleteFlag = (nargout==0);
updateFlag = 0;
statusText = '';
else
deleteFlag = 0;
updateFlag = 1;
statusText = sprintf(varargin{:});
end
% Loop over all unique root handles (figures/desktop) of the supplied handles
rootHandles = [];
if any(handles) % non-0, i.e. non-desktop
try
rootHandles = ancestor(handles,'figure');
if iscell(rootHandles), rootHandles = cell2mat(rootHandles); end
catch
errMsg = 'Matlab version is too old to support figure statusbars';
% Note: old Matlab version didn't have the ID optional arg in warning/error, so I can't use it here
if any(handles==0)
warning([errMsg, '. Updating the desktop statusbar only.']); %#ok for Matlab 6 compatibility
else
error(errMsg);
end
end
end
rootHandles = unique(rootHandles);
if any(handles==0), rootHandles(end+1)=0; end
statusbarObjs = handle([]);
for rootIdx = 1 : length(rootHandles)
if rootHandles(rootIdx) == 0
setDesktopStatus(statusText);
else
thisStatusbarObj = setFigureStatus(rootHandles(rootIdx), deleteFlag, updateFlag, statusText);
if ~isempty(thisStatusbarObj)
statusbarObjs(end+1) = thisStatusbarObj;
end
end
end
% If statusbarHandles requested
if nargout
% Return the list of all valid (non-empty) statusbarHandles
statusbarHandles = statusbarObjs;
end
%end % statusbar %#ok for Matlab 6 compatibility
%% Set the status bar text of the Matlab desktop
function setDesktopStatus(statusText)
try
% First
没有合适的资源?快使用搜索试试~ 我知道了~
Matlab 地球物理工具包.zip
共534个文件
m:307个
f:63个
par:41个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 4 下载量 29 浏览量
2023-04-14
09:40:12
上传
评论 4
收藏 7.83MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a,内含运行结果,不会运行可私信 2.领域:智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,更多内容可点击博主头像 3.内容:标题所示,对于介绍可点击主页搜索博客 4.适合人群:本科,硕士等教研学习使用 5.博客介绍:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可si信
资源推荐
资源详情
资源评论
收起资源包目录
Matlab 地球物理工具包.zip (534个子文件)
ex16.cmd 879B
ex11.cmd 738B
ex17.cmd 699B
ex14a.cmd 668B
ex12.cmd 601B
ex14.cmd 581B
ex10.cmd 471B
ex13.cmd 399B
ex15.cmd 354B
ex08.cmd 331B
ex06.cmd 330B
ex07.cmd 305B
ex05.cmd 293B
ex02.cmd 286B
ex04.cmd 228B
ex03.cmd 186B
ex09.cmd 142B
ex01.cmd 121B
largetrain_rot90.dat 1.13MB
largetrain.dat 183KB
largetrain.dat 183KB
rotatetrain.dat 156KB
largetrain-mscale.dat 122KB
prediction.dat 23KB
smalltrain.dat 20KB
true.dat 20KB
true-mscale.dat 20KB
smalltrain-mscale.dat 13KB
validation.dat 9KB
transect.dat 4KB
data.dat 1KB
template48.dat 583B
template48.dat 583B
visim_dssim_volgeom.eas 504KB
visim_sgsim_volgeom.eas 504KB
visim_target_tri.eas 440KB
visim_target_gauss.eas 440KB
visim_target.eas 293KB
target_bi.eas 293KB
visim_sgsim_volgeom_98.eas 249KB
visim_sgsim_volgeom_19.eas 48KB
visim_sgsim_refmod.eas 41KB
visim_dssim_refmod.eas 41KB
visim_sgsim_volsum.eas 11KB
visim_dssim_volsum.eas 11KB
visim_sgsim_3_volgeom.eas 7KB
visim_dssim_cond.eas 5KB
visim_sgsim_cond.eas 5KB
visim_sgsim_volsum_98.eas 5KB
zincmap.eas 4KB
zinc.eas 3KB
zincat0.eas 2KB
zincat1.eas 2KB
visim_sgsim_volsum_19.eas 1KB
visim_sgsim_3_volsum.eas 201B
locs.eas 136B
gstat.exe 990KB
visim_51_51_51_805_199.exe 797KB
visim_201_201_1_805_199.exe 797KB
visim_101_101_1_805_199.exe 797KB
visim_401_401_1_805_199.exe 797KB
visim.exe 797KB
visim_51_51_1_2000_199.exe 797KB
visim_51_51_2_805_199.exe 797KB
visim_2001_2001_1_1_1.exe 796KB
visim_101_101_1_2000_199.exe 796KB
visim_401_401_1_1_1.exe 796KB
visim_801_801_1_1_1.exe 796KB
snesim.exe 324KB
snesim.f 82KB
visim_readpar.f 35KB
visim_visim_partition_not good.f 25KB
visim_visim.f 24KB
beyond.f 15KB
visim_krige.f 13KB
scal.f 12KB
visim_krige_volume.f 12KB
visim_nhoodvol.f 12KB
visim_setup_krgvar.f 11KB
visim_trans.f 11KB
visim_condtab.f 11KB
visim_randpath.f 8KB
dsortem.f 7KB
visim.f 7KB
sortem.f 7KB
srchsupr.f 6KB
visim_ctable.f 6KB
visim_makepar.f 6KB
cova3.f 5KB
ktsol.f 5KB
setsupr.f 5KB
ksol.f 5KB
pstext.f 5KB
backtr.f 4KB
ordrel.f 4KB
nscore.f 4KB
visim_srchnd.f 4KB
picksupr.f 4KB
setrot.f 4KB
getz.f 4KB
共 534 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- qingfeng1xulai2023-09-04终于找到了超赞的宝藏资源,果断冲冲冲,支持!
- m0_749941212024-07-16简直是宝藏资源,实用价值很高,支持!
- m0_560929252024-04-08这个资源对我启发很大,受益匪浅,学到了很多,谢谢分享~
- 2301_774852052024-05-17发现一个超赞的资源,赶紧学习起来,大家一起进步,支持!
天天Matlab科研工作室
- 粉丝: 4w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功