答案1
这里有两种方法可以改变 Matlab 窗口的标题。
更改命令窗口的标题
这是通过以下脚本完成的(来源):
function idetitle(Title)
%IDETITLE Set Window title of the Matlab IDE
%
% Examples:
% idetitle('Matlab - Foo model')
% idetitle(sprintf('Matlab - some big model - #%d', feature('getpid')))
win = appwin();
if ~isempty(win)
win.setTitle(Title);
end
end
更改图形窗口的名称属性
从这个帖子:
img = imread('pic.jpg','jpg'); r = img(:,:,1); g = img(:,:,2); b = img(:,:,3); figure('Name','this is the red channel'), imshow(r); figure('Name','this is the green channel','NumberTitle','off'), imshow(g); title(gca,'you can also place a title like this') fh = figure; imshow(b); set(fh,'Name','this is the blue channel')
此外,如果您调用
imshow(g,[])
,它会自动将图像缩放到最小/最大。