ga_round4dp.m

来自「基因演算法genetic algorthim的程式實現」· M 代码 · 共 12 行

M
12
字号
function y=GA_round4dp(x)
% function y=GA_round4dp(x)
% 
% Only 6 digits after the decimal point is saved for each matrix x.
% When you design DISCRETE controller, the precision of each parameter of
% the controller is required at least 6 digits after the decimal point.

% PenChen Chou. 7- 1-2001
% Revised on    3-28-2002

y=round(x*1000000)/1000000;

⌨️ 快捷键说明

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