⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_png.m

📁 Matlab下的EEG处理程序库
💻 M
字号:
function save_png(file,F, res)

% SAVE_PNG - Save figure to PNG file
% 
% Useage: save_png(file,F,res)
% 
% 'file'    - the string filename
% 'F'       - a figure handle, when empty uses 'gcf'
% 'res'     - resolution, 600 dpi default
% 
% Outputs Portable Network Graphics (600 dpi)
% 

% $Revision: 1.3 $ $Date: 2003/03/19 00:58:50 $

% Licence:  GNU GPL, no implied or express warranties
% History:  02/2003, Darren.Weber@flinders.edu.au
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if exist('F','var'),
    if isempty(F), F = gcf; end
else
    F = gcf;
end
if exist('file','var'),
    if isempty(file), error('no filename'); end
else
    error('no filename');
end
if exist('res','var'),
    if isempty(res), res = 600; end
else
    res = 600;
end



driver = '-dpng';
option1 = '-noui';
option2 = sprintf('-r%d',res);
%option3 = '-zbuffer';
fprintf('saving to:...%s\n',file);
print(F,driver,option1,option2,file);

return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -