MATLAB Answers

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

2 views (last 30 days)
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.

  0 Comments

Sign in to comment.

Accepted Answer

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

More Answers (0)

Products


Release

R2020a

Translated by