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

📄 matlabrt.m

📁 MATLAB扩展编程by 孙永康.ZIP.有需要的朋友请来下载.
💻 M
字号:
%MATLABRT Master startup M-file for the MATLAB Runtime Server.
%   MATLABRT is automatically executed by the Runtime Server during
%   startup. It calls PATHDEFRT, sets Figure size and uicontrol defaults,
%   and launches the Runtime Server application.

%   Copyright 1984-2000 The MathWorks, Inc.
%   $Revision: 1.16 $  $Date: 2000/06/01 00:12:58 $

% The RecursionLimit forces MATLAB to throw an error when the specified
% function call depth is hit.  This protects you from blowing your stack
% frame (which can cause MATLAB and/or your computer to crash).  Set the
% value to inf if you don't want this protection.
cname = computer;
if strncmp(cname,'GLNX',4)
  set(0,'RecursionLimit',100)
elseif strncmp(cname,'ALPHA',5)
  set(0,'RecursionLimit',200)
else
  set(0,'RecursionLimit',500)
end

% Set up path.
if exist('pathdefrt')
  matlabpath(pathdefrt);
end

% Set default warning level to WARNING OFF.
warning off

% Set the default figure position, in pixels.
% On small screens, make figure smaller, with same aspect ratio.
screen = get(0, 'ScreenSize');
width = screen(3);
height = screen(4);
cname = computer;
if screen(3:4) ~= [1 1]  % don't change default if screensize == [1 1]
  if all(cname(1:2) == 'PC')
    if height >= 500
      mwwidth = 560; mwheight = 420;
      if(get(0,'screenpixelsperinch') == 116) % large fonts
        mwwidth = mwwidth * 1.2;
        mwheight = mwheight * 1.2;
      end
    else
      mwwidth = 560; mwheight = 375;
    end
    left = (width - mwwidth)/2;
    bottom = height - mwheight -60;
  else
    if height > 768
      mwwidth = 560; mwheight = 420;
      left = (width-mwwidth)/2;
      bottom = height-mwheight-60;
    else  % for screens that aren't so high
      mwwidth = 512; mwheight = 384;
      left = (width-mwwidth)/2;
      bottom = height-mwheight-50;
    end
  end
  rect = [ left bottom mwwidth mwheight ];
  set(0, 'defaultfigureposition',rect);
end

colordef(0,'white') % Set up for white defaults

%% For Japan, set default fonts
lang = lower(get(0,'language'));
if strncmp(lang, 'ja', 2)
   if strncmp(cname,'PC',2)   
      set(0,'defaultuicontrolfontname',get(0,'factoryuicontrolfontname'));
      set(0,'defaultuicontrolfontsize',get(0,'factoryuicontrolfontsize'));
      set(0,'defaultaxesfontname',get(0,'factoryuicontrolfontname'));
      set(0,'defaultaxesfontsize',get(0,'factoryuicontrolfontsize'));
      set(0,'defaulttextfontname',get(0,'factoryuicontrolfontname'));
      set(0,'defaulttextfontsize',get(0,'factoryuicontrolfontsize'));
   end
end

% Make uicontrols, uimenus and lines look better on monochrome displays.
if get(0,'ScreenDepth')==1,
   set(0,'DefaultUIControlBackgroundColor','white');
   set(0,'DefaultAxesLineStyleOrder','-|--|:|-.')
   set(0,'DefaultAxesColorOrder',[0 0 0]);
   set(0,'DefaultFigureColor',[1 1 1]);
end

%% For European countries using A4 paper the following line should
%% be uncommented
%set(0,'DefaultFigurePaperType','a4letter')

% Clean up workspace.
clear

% Set the global error behavior for the Runtime Server
runtime('errormode','dialog');

% Execute the Runtime Server application.
amortsched

⌨️ 快捷键说明

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