Cell Array to output like this?
7 次查看(过去 30 天)
显示 更早的评论
A = 14×1 cell array
{'0.1' }
{'0.2' }
{'1' }
{'1.1' }
{'1.2.3' }
{'1.2.3.1'}
output i want like this
A =
0.1
0.2
1
1.1
1.2.3
1.2.3.1
2 个评论
Rik
2021-8-11
What is flagging your own question going to achieve? You can post comments and even edit your question to clarify it.
采纳的回答
the cyclist
2021-8-11
Here is one way:
A = {'0.2','1'}
output = cellfun(@str2num,A)
8 个评论
Stephen23
2021-8-12
No need for CELLFUN when STRCAT can handle that cell array by itself:
A = {'0.2','1.2.3'};
B = strcat('SELECT sum(abc .time_taken) from abc.que_toc_no = ''',A(:),''' ORDER BY abc')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!