在利用contains进行关键词检索的时候,遇到带查找的是多行字符串构成的char的情况无法检索的情况
n = contains(CDS_struct.note{w},pattern_positive,'IgnoreCase',true);
> 错误使用 contains 搜索词 必须为字符串数组、字符向量或字符向量元胞数组。
查看一下CDS_struct.note{w}是啥?
lcd = CDS_struct.note{w}
lcd =
5×58 char 数组
'virion protein; inhibits stress-induced '
'translational arrest; related to eIF2 phosphatase '
'regulatory subunit GADD34; binds protein phosphatase 1 to '
'form a holoenzyme capable of dephosphorylating eIF2-alpha;'
'involved in translational regulation
引入新的函数** convertCharsToStrings()**来解决问题
class(lcd)
ans =
'char'
>> lcd = convertCharsToStrings(lcd)
lcd =
"