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.

 採用された回答

madhan ravi
madhan ravi 2020 年 6 月 1 日

0 投票

Grouped_Weights.Country(cellfun(@isempty,Grouped_Weights.Country),:) = {'OTHER'}

2 件のコメント

Mario Diaco
Mario Diaco 2020 年 6 月 1 日
thanks a lot!
Walter Roberson
Walter Roberson 2025 年 3 月 24 日
OUTPUT = fillmissing(INPUT, 'previous');
is probably what you are asking about.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Characters and Strings についてさらに検索

製品

リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by