MATLAB: How to get numerical values as well as texts in a single matrix after reading data from a excel file


[num,txt]=xlsread(filename,sheet) here num contains all numerical value and nan (not a number)and txt contains all the ,how can i replace these nan elements in num by the elements of txt?

Best Answer

  • The easiest way (not having your file to test this on) is to add a third output to xlsread:
    The ‘raw’ output should have everything just as the function imported it.