Changing corresponding column based on condition, for a table.

8 ビュー (過去 30 日間)
Claire Hollow
Claire Hollow 2020 年 6 月 1 日
コメント済み: Claire Hollow 2020 年 6 月 1 日
Hello. Ok this should be rather simple but absolutely nothing I try has worked and I've reached a dead end. I have a table that is 23000x14. I am trying to go through all of column 10 in my table and if it is ever equal to 'female', I want column 9 of the same row to change to 'false'. I've tried several things and always end up with weird categorical array errors. Please help I am desperate lol. Thank you in advance!

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 1 日
編集済み: madhan ravi 2020 年 6 月 1 日
T{ismember(T{:,10},'female'),9} = {'false'} % T your table
  1 件のコメント
Claire Hollow
Claire Hollow 2020 年 6 月 1 日
Wow that worked perfect, thank you so much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by