How to replace a missing value in a table with a string?

7 Ansichten (letzte 30 Tage)
Mario Diaco
Mario Diaco am 1 Jun. 2020
Kommentiert: Mario Diaco am 1 Jun. 2020
Hi.
I would find and replace the missing values (0x0 char) in a table column with the string 'OTHER'.
I tried this way, but it doesn't find the missing value:
strrep(Grouped_Weights{1,1}.Country,'','OTHER')
I've to automatize this process and I can't simply replace the single value.
Thanks.

Akzeptierte Antwort

madhan ravi
madhan ravi am 1 Jun. 2020
Grouped_Weights.Country(cellfun(@isempty,Grouped_Weights.Country),:) = {'OTHER'}

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by