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

📄 plotsave.m

📁 这是国外关于卫星导航方面一书的源代码
💻 M
字号:
function []=plotsave(fmt)
% -----------------------------------------------------------------------------
%  GPSLab - PLOTSAVE.M   Saving figures shown in the GPSLAB window
% -----------------------------------------------------------------------------
%
%
% (c) iapg 1998 zeb
% -----------------------------------------------------------------------------

set(findobj('style','pushbutton'),'visible','off')
set(findobj('style','popupmenu'),'visible','off')
set(findobj('style','listbox'),'visible','off')
set(findobj('style','text'),'visible','off')
set(findobj('style','checkbox'),'visible','off')
set(findobj('style','radiobutton'),'visible','off')
set(findobj('style','slider'),'visible','off')
set(findobj('style','edit'),'visible','off')
set(findobj('style','frame'),'visible','off')


     switch fmt,
     case 'ps', 
        
     [fname,pname]=uiputfile('gpsplot1.eps','saving in EPS format: actual plot',10,10);
     if fname==0 & pname==0
        errordlg(['Cancel in program PLOTSAVE.M . ',...
       ' Cancel stops the job undone.'], ...   
       'GPSLab: break -  1998 zeb');
       return;
     end

     eval(['print -depsc2 -tiff ' pname fname]');
     
   
gpsjpg=imread('sat.jpg','JPEG');
hmsg=msgbox(['The figure was saved in EPS ' ...
'using the file name typed in by you. Note: Encapsulated PostScript Level 2 ' ...
'in color mode. A repeated save using the same file name overwrites without warning !'], ...
'GPSLab Info: Saving graphics in EPS -  1998 zeb','custom',gpsjpg,summer(64));
clear gpsjpg;

        
     case 'jpg',
        
     [fname,pname]=uiputfile('gpsplot1.jpg','saving in JPG format: actual plot',10,10);
     if fname==0 & pname==0
      errordlg(['Cancel in program PLOTSAVE.M . ',...
      ' Cancel stops the job undone.'], ...   
      'GPSLab: break -  1998 zeb');
      return;
     end
   
     eval(['print -djpeg ' pname fname]);
        
gpsjpg=imread('sat.jpg','JPEG');
hmsg=msgbox(['The figure was saved in JPEG ' ...
'using the file name typed in by you. Note: the compression is set to 75 % . ' ...
'A repeated save using the same file name overwrites without warning !'], ...
'GPSLab Info: Saving graphics in JPEG  -  1998 zeb','custom',gpsjpg,summer(64));
clear gpsjpg;

       otherwise
          
            warndlg(['Unvalid variable "fmt": the value of "fmt" has to be ' ...
	         ' ''ps'' or ''jpg'' !'], 'error while calling PLOTSAVE.M');
   			return;


       end % switch
       
       
set(findobj('style','listbox'),'visible','on')
set(findobj('style','popupmenu'),'visible','on')
set(findobj('style','pushbutton'),'visible','on')
set(findobj('style','text'),'visible','on')
set(findobj('style','checkbox'),'visible','on')
set(findobj('style','radiobutton'),'visible','on')
set(findobj('style','slider'),'visible','on')
set(findobj('style','edit'),'visible','on')
set(findobj('style','frame'),'visible','on')
       
       
% -----------------------------------------------------------------------------
% (c) iapg 1998 zeb
% -----------------------------------------------------------------------------

⌨️ 快捷键说明

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