Removing 'quotes' from a cell array
古いコメントを表示
I have a cell array with 2 columns..
Column 1 is made up of 'a' ''b' 'c' '''d'
Column 2 is 123 456 678
I need to export this into a ASCII tab delimited file as a 123 b 456 c 678 ...
How can I remove the ' or '' or ''' quotes?
Thanks, S
2 件のコメント
Those quote are not part of the data stored in your table. They are only there in the visualisation.So if you could remove them, the result would be to replace them with NaN.
I will move your answer to the comment section, since it actually isn't an answer.
採用された回答
その他の回答 (1 件)
susan
2012 年 10 月 21 日
0 投票
3 件のコメント
Matt J
2012 年 10 月 21 日
Are you talking to me? If so, you should post this as a comment to my answer. What part didn't work? It gets rid of double quotes fine for me, e.g.
>> mycell={'dog"','"cat','"mouse"'}
mycell =
'dog"' '"cat' '"mouse"'
>> strrep(mycell,'"','') %double quotes gone
ans =
'dog' 'cat' 'mouse'
susan
2012 年 10 月 21 日
Matt J
2012 年 10 月 21 日
Did you see my solution above (the Comment to my original Answer)?
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
