I want to convert a single cell to a float number
10 次查看(过去 30 天)
显示 更早的评论
i have a cell
celltest = {23.234,123.45};
And I want to convert the first number to float
something like this:
cell2float(celltest(1))
0 个评论
回答(3 个)
the cyclist
2022-4-3
I'm confused. The way you have defined celltest, the first element is already a (double-precision) floating-point number:
celltest = {23.234,123.45};
class(celltest{1})
KSSV
2022-4-3
celltest = {23.234,123.45};
class(celltest{1})
If it is double, nothing need to be done. If it is a string, read about str2num, str2double.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!