Clear Filters
Clear Filters

Converting 0 to Nan in Timetable

18 views (last 30 days)
Benedikt Skurk
Benedikt Skurk on 19 May 2021
Commented: Benedikt Skurk on 19 May 2021
is it possible to change 0 to Nan in a timetable for every column? A cutout of the timetable is attached.
I couldnt find any solution for that, i am pretty new to Matlab. The reason why i want this, is that i dont want to plot the 0, so they will be "skipped".
Thanks for the help!!

Accepted Answer

KSSV on 19 May 2021
If T is your table .. to convert zeros in column 3 into NaN use:
T.(3)(T.(3)==0) = NaN ;

More Answers (0)


Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!