isinteger.m

来自「国外人编写的一个分数阶系统的控制工具箱」· M 代码 · 共 10 行

M
10
字号
function output = isinteger(a)

% function output = isinteger(a)
% This function returns 1 if a is an integer and 0 if it is not.
% If a is complex and 1 is returned,
% this means that both the real and the imaginary parts are integer.
% If a is a matrix, a matrix of ones and zeros is returned.
% Duarte Val閞io 2003

output = ((a - round(a)) == 0);

⌨️ 快捷键说明

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