![让窗口有更好的名称](https://linux22.com/image/1569075/%E8%AE%A9%E7%AA%97%E5%8F%A3%E6%9C%89%E6%9B%B4%E5%A5%BD%E7%9A%84%E5%90%8D%E7%A7%B0.png)
答案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,[])
,它会自动将图像缩放到最小/最大。