matlab categorical data
findstr
findstr 在字符串中找出匹配字符
K = findstr(S1,S2). findstr 是一个对称函数,返回的是出现比配成功的字符坐标。
Examples
s = ‘How much wood would a woodchuck chuck?’;
findstr(s,‘a’) returns 21
findstr(‘a’,s) returns 21
findstr(s,‘wood’) returns [10 23]
findstr(s,‘Wood’) returns []
findstr(s,’ ') returns [4 9 14 20 22 32]
categorical Arrays for categorical data.
Categorical arrays are used to store discrete non-numeric values.
分类型数组用来存储非数值型的数。
A
在分类型数组中,使用分类型构造器 categorical constructor,创建一个分类型数组
%%%%%%%%%%个人觉得这段没啥用,但是不删了,留给别人看看
Use the categorical constructor to create a categorical array from string or from integer or logical values. Use the HISTC function to create a categorical array by discretizing continuous numeric values.
Each categorical array carries along the set of possible values that it can
store, known as its categories. The categories are defined when you create
a categorical array, and you can access them using the CATEGORIES method, or
modify them using the ADDCATS, RENAMECATS, MERGECATS, or REMOVECATS methods.
Assignment to a categorical array can also automatically add new categories
if the values assigned are not already categorie