columns with zeors and NaN

Hi all,
I have a column k= NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
when I convert it to num2cell(k) and export it in excel some elements of that column take value zero while some other are NaN. Why is this the case? can i correct this so as to have only NaNs which is the real k

5 Comments

My guess is that it depends on preset properties of the target cells in Excel. Btw, what is a NaN in Excel?
Let me give you more information about the problem . I load an excel file in matlab which is a matrix and contains numbers and NaNs. In the workspace it is menyioned that it is a double.
Now I want to rearrange this matrix, say M, and create from it another matrix say K. So I specify the dimensions of K by issuing the commnad K=zeros(,) and then I use nu2cell(K) since i
use ss=[nu2cell(K) A] whic is a string colums vector.
Then when I export ss in excel some elemts that should be NaN are zeros but some other cells are correclty zeros. Matrix M displays the elements properly. ONly ss distorts the resutls.
Any suggestions?
Thanks
a small correction: where A is a colums vector of strings
It would be faster if you posted a complete example (code) .
thanks oleg. I found the solution

Answers (0)

This question is closed.

Tags

Asked:

on 25 May 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!