Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 单元格数组删除每个单元格中的前导字符_Arrays_String_Matlab_Cell Array - Fatal编程技术网

Arrays 单元格数组删除每个单元格中的前导字符

Arrays 单元格数组删除每个单元格中的前导字符,arrays,string,matlab,cell-array,Arrays,String,Matlab,Cell Array,我有一个27 x 3的单元格,每个单元格包含文本 由于某些恼人的原因,我正在使用的数据已保存在每个单元格中,以“a”开头,如何删除这些单元格 我的数据示例 column 1 column 2 column 3 'some 'text 'blah 'more 'blah 'help 我想要什么 column 1 column 2 column 3 some text blah

我有一个27 x 3的单元格,每个单元格包含文本

由于某些恼人的原因,我正在使用的数据已保存在每个单元格中,以“a”开头,如何删除这些单元格

我的数据示例

   column 1    column 2   column 3
   'some       'text      'blah
   'more       'blah      'help
我想要什么

   column 1    column 2   column 3
   some       text      blah
   more       blah      help
使用cellfun的最佳方式是什么?如果是,您如何使用它?

使用合适的工具。匿名函数应接受字符串并删除其第一个字符,因此
@(s)s(2:end)

结果:

c = 
    'some'    'text'    'blah'
    'more'    'blah'    'help'
c = 

    'some'    'text'    'blah'
    'more'    'blah'    'help'
使用合适的工具。匿名函数应接受字符串并删除其第一个字符,因此
@(s)s(2:end)

结果:

c = 
    'some'    'text'    'blah'
    'more'    'blah'    'help'
c = 

    'some'    'text'    'blah'
    'more'    'blah'    'help'
另一种选择是使用:

它还返回:

另一种选择是使用:

它还返回: