how to get numerical values as well as texts in a single matrix after reading data from a excel file ?

2 次查看(过去 30 天)
[num,txt]=xlsread(filename,sheet) here num contains all numerical value and nan (not a number)and txt contains all the texts.now ,how can i replace these nan elements in num by the elements of txt?

采纳的回答

Star Strider
Star Strider 2015-5-18
The easiest way (not having your file to test this on) is to add a third output to xlsread:
[num,txt,raw]=xlsread(filename,sheet)
The ‘raw’ output should have everything just as the function imported it.
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by