how to split cell array values into two columns?
2 次查看(过去 30 天)
显示 更早的评论
I've a variable in cell array as
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167264/image.png)
[2.13949546690144;56.9515770543056] [1.98550875192835;50.4110852121618] . . . . . I want to split it into two columns with two decimal-point numbers as
2.13 56.95
1.98 50.41
.
.
.
by removing open, close braces and semicolon such as [ ; ]
0 个评论
回答(1 个)
KL
2017-12-5
one way:
C = {[2.13949546690144;56.9515770543056]};
A = round([C{:}].'*100)/100
A =
2.1400 56.9500
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!