Dino C
Dino C

Reputation: 317

Replace nan with empty in Table with Multiple Data Types

I 'm running MATLAB R2016a. I 'm working on a table like this. It contains multiple data types. Fillmissing function runs in R2016b Edition. What I want to achieve is to replace NaN's with blanks only in numerical data types. The goal is to Export a csv without NaN's in numerical columns. Any idea?

    Var1           Var2             Var3
_____________    _________    _____________________

'2101PV'         'QZ'         6,13               
'2102PV'         'QZ'         6,13               
'2103PV'         'QZ'         NaN                  
'2104PV'         'QZ'         NaN    

Upvotes: 0

Views: 1654

Answers (1)

Tommaso Belluzzo
Tommaso Belluzzo

Reputation: 23675

tab(ismissing(tab)) = {''};

But it's not clear how you managed to mix datatypes in your rows...

Upvotes: 2

Related Questions