Filter löschen
Filter löschen

Removing NaNs from imported table

190 Ansichten (letzte 30 Tage)
Ilay Green
Ilay Green am 14 Jan. 2023
Kommentiert: Star Strider am 14 Jan. 2023
Hey everyone,
I am trying to remove all the NaNs from an imported table with readtable() (.xlsx file).
i've tried using isnan() but without success.
assuming all i have right now is:
R = readtable('blabla')
how can i remove the NaNs and keep the save the new table?
  • table looks like this:
thanks for the help!

Akzeptierte Antwort

Star Strider
Star Strider am 14 Jan. 2023
See if the rmmissing function (introduced in R2016b) will do what you want.
  4 Kommentare
Ilay Green
Ilay Green am 14 Jan. 2023
tyvm!
made me realize it is not neccesary to use a certain function when facing a problem!
Star Strider
Star Strider am 14 Jan. 2023
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Jeff Beck
Jeff Beck am 14 Jan. 2023
Bearbeitet: Jeff Beck am 14 Jan. 2023
You might try using the "MissingRule" option set to "omitrow" in readtable:
R = readtable('blabla', 'MissingRule', 'omitrow');
  1 Kommentar
Ilay Green
Ilay Green am 14 Jan. 2023
thanks for reply!
its not working though, Star Strider solution worked well for me

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by