convert cell to double

5 次查看(过去 30 天)
mmdmeule
mmdmeule 2014-3-10
Hello,
When i imported data from my excel sheet to Matlab by using the 'import data' button, some colums were identified as cell and others as double (all the colums in excel consists of numbers). The data in the colums that are 'double' are NaN (once imported), and I can't convert the cell type to double in order that i can plot these.
Can anyone help me with this?
Thanks!

回答(1 个)

Sean de Wolski
Sean de Wolski 2014-3-10
In the import tool, change the selection to double, then reimport.
This is the best part of the import tool, you can rapidly change your settings until you're happy.
  2 个评论
mmdmeule
mmdmeule 2014-3-10
编辑:mmdmeule 2014-3-10
Thank you for responding this quickly.
But it is not possible to do this. I have two options : cell ("cells will have the MATLAB equivalent of the spreadsheet type") and number(cells will be converted into Matlab doubles."). the spreadsheet type is number. When I select cell, i can't convert this and when i select number , this must be replaced with NaN or can't be imported...
Sean de Wolski
Sean de Wolski 2014-3-10
Could you attach a small representative example of your excel file (zipped)?

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by