matlab categorical data

本文介绍了MATLAB中findstr函数的使用,用于在字符串中查找匹配字符,并展示了其对称性。同时提及了categorical Arrays在处理类别数据时的作用,包括如何从字符串、整数或逻辑值创建分类数组,以及利用HISTC函数对连续数值进行离散化创建分类数组。
摘要由CSDN通过智能技术生成

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值