Matlab注释规范与自定义

Matlab注释规范

MATLAB脚本注释规范

%% Title: Interval estimation LTI system
% Author: Zhang San([email protected])
% Date  : 20xx-xx-xx
%% Reference
% [1]  Alamo T, Bravo J M, Camacho E F. Guaranteed state estimation by zonotopes[J]. Automatica, 2005, 41(6): 1035-1043.
% [2] Combastel C. Zonotopes and Kalman observers: Gain optimality under distinct uncertainty paradigms and robust convergence[J]. Automatica, 2015, 55: 265-273.
% 

%% Introduction
% In the field of satellite-ground laser communication, the ground station needs to know the orbit of the satellite to perform acquisition tracking and pointing process to point the laser to the satellite precisely. This script gives a simulation of ** algorithm using the *** model as an example. In this file will achieve the following functions:
%
% # Establishment trajectory
% # Get the trajectory data
% # Visualization
% # Obtain the observable interval
Ts = 0.01;
%% Step 1:

%% Step 2:

%% Step 3:

%% Figure
figure,
plot(rand(1,100),'r');

MATLAB函数注释规范

function varargout = boundingbox(F,ops,x)
%BOUNDINGBOX Computes bounding box of a constraint
%
% If only one output is requested, only the symbolic model is returned
%  B = boundingbox(F)
%
% If three outputs are requested, numerical values are returned too
%  [B,L,U] = boundingbox(F)
%
% A second argument can be used to specificy solver settings
%  B = boundingbox(F,sdpsettings('solver','cplex'))
%
% A third argument can (should!) be used to obtain a bounding box in a
% particular set of variables, i.e. the bounding box of a projection.
% Unless you specify which variables you are computing the bounding box
% w.r.t, it will be very hard for you to understand which variables the
% values in L and U relate to
%  [B,L,U] = boundingbox(F,[],x)
% B will now be the box [L <= x <= U] (infinite bounds not included)

if nargin < 2
    ops = sdpsettings('verbose',0);
end

if nargin < 3
    [B,L,U] = boundingbox(lmi(F),ops);
else
    [B,L,U] = boundingbox(lmi(F),ops,x);
end
switch nargout
    case 0
        B
    case 1
        varargout{1} = B;
    case 2
        varargout{1} = B;
        varargout{2} = L;
    case 3
        varargout{1} = B;
        varargout{2} = L;
        varargout{3} = U;
    otherwise
end

MATLAB绘图注释规范

%% Figure 1: init state diagram
	% Element 1: 绘制粗跟踪探测器范围
	
	% Element 2: 绘制不确定域大小
	
	% 图区属性
	
	% 图例与标签属性

Matlab自定义字体

字体下载,如
http://dl2.downxy.com/down/YaHeiConsolas_downcc.zip
复制到MATLAB安装目录中的字体文件夹,如:

C:\Program Files\MATLAB\R2019b\sys\java\jre\win64\jre\lib\fonts

将字体文件放入该文件夹后,重启MATLAB,进入预设-字体,即可设置成所需字体

你可能感兴趣的:(编程语言,matlab,代码规范,脚本语言)