Matlab: commonly used built-in functions

ischar

tf = ischar(A) %判断是否为字符数组

returns logical 1 (true) if A is a character array and logical 0 (false) otherwise.

isstring

tf = isstring(A) %判断是否为string

returns 1 (true) if A is a string array. Otherwise, it returns 0 (false).

isnumeric

tf = isnumeric(A) %判断是否为数值型数据。数值型数据有:single,double,int等

returns true if A is a numeric array and false otherwise.

max

M=max(A)   
M=max(A,[],dim)
[M,I]=max(A)	%返回最大值和对应索引
Published 47 original articles · Like 33 · Visit 310,000+

Guess you like

Origin blog.csdn.net/kaever/article/details/70859697