Splitting a String in a table once
显示 更早的评论
The table provided in the picture is an example of the one i am working with (main table has over 4600 rows). I want/ need to split the first colum at the first white space. So that the output would be "ACTB" and "diff1 day 30" for example.
My internet research has brought me to the function
regexp()
with the parameters: (data,' ','split','once')
data = nameofthetable.columname
So far this hasn't worked for me, since i get the following error:
Error using regexp
The 'STRING' input must be either a char row vector, a cell array of char row vectors, or a
string array.
My question is can i even use this function with a table enviroment and if so how can i make it work and insert a new row? Or is the data type of the first colum wrong and not even a string?
I hope u can help me with this problem.
Thanks in advance.

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!