How to replace MATLAB icon from a figure window?

How to replace or delete the MATLAB icon (the peaks) from a figure window?

댓글 수: 1

Bruno Luong
Bruno Luong 2011년 1월 30일
Replacing or altering figure icons violates Matlab license agreement.

댓글을 달려면 로그인하십시오.

 채택된 답변

Paulo Silva
Paulo Silva 2011년 1월 30일

1 개 추천

replace FIGUREHANDLE with your figure handle, test with gcf
replace PATH with the path, name and extension of the icon for example
C:\Program Files (x86)\MATLAB\R2008b\toolbox\systemtest\systemtest\icons\StopElement.gif
warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');
jframe=get(FIGUREHANDLE,'javaframe');
jIcon=javax.swing.ImageIcon('PATH');
jframe.setFigureIcon(jIcon);

추가 답변 (2개)

Siddharth Shankar
Siddharth Shankar 2011년 1월 30일

4 개 추천

As Bruno says, that would be a breach of the MathWorks license agreement. Specific details here:

댓글 수: 4

Jan
Jan 2011년 1월 30일
Why is this icon so important for MathWorks? Does this concerns Java windows opened from Matlab also? And if I maximize a figure such that the just the innerposition fill the complete screen and the titlebar is not visible anymore?
Jan, I can't interpret the license agreement in more detail than what is outlined in that solution. If a request is made to MathWorks technical support with those questions, I am sure they will be able to provide some answers (likely after consulting the MathWorks legal team).
Vieniava
Vieniava 2011년 1월 31일
Siddarth, thanks for pointing out the reference to license agreement
Vieniava
Vieniava 2011년 1월 31일
Jan Simon, thanks. I think this is too rigid, especially when someone has got commercial license for Matlab/Compiler and sells own software.

댓글을 달려면 로그인하십시오.

Antony
Antony 2024년 2월 4일
편집: Antony 2024년 2월 4일

0 개 추천

This answer is pretty old and I've bumped into it a few times, so for the sake of new users,
here's how its done. (BTW, I'm assuming a UI figure).
fig = uifigure("WindowStyle","alwaysontop");
fig.Position = [500 500 1000 445];
pathToMLAPP = fileparts(mfilename('fullpath'));
fig.Icon = fullfile(pathToMLAPP, 'my_icon.png');

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품

질문:

2011년 1월 30일

편집:

2024년 2월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by