how would i split a table based on a portion of a keyword

1 回表示 (過去 30 日間)
Mark Peeters
Mark Peeters 2020 年 9 月 9 日
コメント済み: Xavier 2020 年 9 月 9 日
I have a table that has a many cols, however the data is from different product range. I generally what to sort it into two tables based on one cols containing a specific word that is common to the data, but there are other words and int's in the cell as well. How do i isolate these words to sort them, the position of the key word is not static, or a fixed character away from the start?
If that makes sense?

採用された回答

Xavier
Xavier 2020 年 9 月 9 日
Something like this may work, but it depends on how your data is structured in the table- if you can provide more information I can update my answer
table_one = main_table(contains(main_table.yourColumn, "key text"), :);
table_two = main_table(~contains(main_table.yourColumn, "key text"), :);
  2 件のコメント
Mark Peeters
Mark Peeters 2020 年 9 月 9 日
Xavier you legend, thank you!
Xavier
Xavier 2020 年 9 月 9 日
Glad I could help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by