convert cell to integer
128 ビュー (過去 30 日間)
古いコメントを表示
I have a 1*1 cell in which its content is ineger. I need to convert the content to integer (no cell anymore just like a number itself)
how can I do that?
I tied cell2mat but did not work. It is like this now:
kar =
1×1 cell array
{[3]}
回答 (1 件)
Star Strider
2019 年 8 月 16 日
If ‘kar’ is initially:
kar = {{[3]}};
try this:
n = cell2mat(kar{:})
producing:
n =
3
参考
カテゴリ
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!