Converting 0 to Nan in Timetable

조회 수: 1 (최근 30일)
Benedikt Skurk
Benedikt Skurk 2021년 5월 19일
댓글: Benedikt Skurk 2021년 5월 19일
Hello,
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!!

채택된 답변

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by