Matlab更改figure上logo的方法
来源:互联网 发布:上海大数据会议 编辑:程序博客网 时间:2024/05/23 01:57
网上闲逛,发现很有意思是的代码,转载来玩玩。
function chgicon(h,filename)
%CHGICON changes the figure icon.
%CHGICON(H,FILENAME) changes the icon of a figure to an image specified by
%the string FILENAME, where H is a handle to the figure. If the file is not
%in the current directory or in a directory in the MATLAB path,specify the
%full pathname of the location on your system. If FILENAME is not a valid
%image file name, the function just removes the previous icon of the figure.
%%Example:
%h = figure;
%chgicon(h,'newIcon.png'); % replace 'newIcon.png' with your ima
%IMPORTANT NOTES:
%REPLACING THE MATLAB GUI ICON VIOLATES THE LICENSE AGREEMENT
% OF MATLAB. DO NOT USE THIS FUNCTION COMMERCIALLY.
if nargin<2
error('MATLAB:chgicon','%s','Too few input arguments!');
end
if nargin >2
error('MATLAB:chgicon','%s','Too many input arguments!');
end
newIcon = javax.swing.ImageIcon(filename);
javaFrame = get(h,'JavaFrame');
javaFrame.setFigureIcon(newIcon);
% 上面的函数保存在自己要使用的路径下,再调用即可
% 调用语句:
% h = figure
% chgicon(h,'C:/Users/mofeng/Desktop/12.jpg');
原图:
修改后:
转载自:
http://www.ilovematlab.cn/thread-57132-1-1.html
- Matlab更改figure上logo的方法
- matlab 读取figure 文件上的数据
- Matlab的Figure窗口设置全屏方法
- matlab figure的用法
- Matlab: figure的用法
- Matlab: figure的用法
- Matlab 自定义figure上下标
- 更改figure的标题栏显示
- matlab中figure有多个图时,设定总标题的方法
- matlab figure界面没有菜单栏的问题
- matlab 建立新的visible off figure
- matlab 中的 figure 之间的切换方式
- matlab中figure对象的按键响应
- 更改linux2.6的 logo
- 更改网站地址栏的logo
- 地址栏上的LOGO
- 二维码上的logo
- matlab Figure Properties
- DOS下里的sqlplus
- 复制表
- zz网站的最大并发连接数
- 蓝牙C语言编程
- chapter9顺序容器
- Matlab更改figure上logo的方法
- Hibernate拦截器和监听器
- oracle 日期显示英文格式
- 读书笔记——《UNIX环境高级编程》第六章_系统数据文件和信息
- 值传递与引用传递
- Lucene学习笔记(二)
- 续——datalist嵌套方法二
- (转)利用VC++实现局域网实时视频传输(网络视频)
- MyEclipse配置oracle 连接