http://hi.baidu.com/pengjun/blog/item/2dc2cdbf84054f0218d81f4c.html
答案当然是有的,那么我们就需要去更改MATLAB自带的系统函数plotperf.m,好了,在命令窗口运行edit plotperf.m就可以打开该M文件了,将其中的程序更改如下:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New figure
function fig = new_figure(name)
fig = figure(...
'Units', 'pixel',...
'Name', name,...
'Tag', 'train',...
'NumberTitle', 'off',...
'IntegerHandle', 'off',...
'Toolbar', 'figure',...
'Menubar', 'figure');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create new plot in figure
function createNewPlot(fig)
% Delete all children from figure
z = get(fig,'children');
for i=1:length(z)
delete (z(i));
end
% Create axis
ud.TrainAxes = axes('Parent',fig);
ud.TrainLine = plot(0,0,0,0,0,0,0,0,'EraseMode','None','Parent',ud.TrainAxes);
ud.TrainXlabel = xlabel('X Axis','Parent',ud.TrainAxes);
ud.TrainYlabel = ylabel('Y Axis','Parent',ud.TrainAxes);
ud.TrainTitle = get(ud.TrainAxes,'Title');
set(ud.TrainAxes,'yscale','log');
ud.XData = [];
ud.YData = [];
ud.Y2Data = [];
set(fig,'UserData',ud,'menubar','figure','toolbar','figure');
上面只是整个函数的片段,其目的就是为画图窗口添加一个图形窗口一样的菜单栏和标题栏。之后,保存,再次运行plotperf(tr),就会得到这样的窗口: