manipulate table containing numeric and string

1 回表示 (過去 30 日間)
Khairul Nur
Khairul Nur 2021 年 8 月 5 日
コメント済み: Khairul Nur 2021 年 8 月 5 日
hi, i have a table containing numeric and string as follow:
crisp_distance_per_cluster1 crisp_distance_per_cluster2 Var3
___________________________ ___________________________ _______________
1 2.3904 'dummy_data_1'
1 2.5404 'dummy_data_2'
1 1.5547 'dummy_data_3'
1 0.92612 'dummy_data_4'
1 1.0761 'dummy_data_5'
1 2.1333 'dummy_data_6'
1 1.2761 'dummy_data_7'
2 7.0547 'dummy_data_8'
2 7.8476 'dummy_data_9'
2 9.1404 'dummy_data_10'
2 9.9047 'dummy_data_11'
I want to split the table into different table based on the crisp_distance_per_cluster1. For example, if crisp_distance_per_cluster1=1, will be
1 2.3904 'dummy_data_1'
1 2.5404 'dummy_data_2'
1 1.5547 'dummy_data_3'
1 0.92612 'dummy_data_4'
1 1.0761 'dummy_data_5'
1 2.1333 'dummy_data_6'
1 1.2761 'dummy_data_7'
I dont want to convert the table into string since later i need to do some numerical calculation. Please help to give suggestion, ideas or code. TQIA.

採用された回答

KSSV
KSSV 2021 年 8 月 5 日
If T is your table...
T1 = T(T.(1)==1,:)
  1 件のコメント
Khairul Nur
Khairul Nur 2021 年 8 月 5 日
as simple as that...u are my hero bro!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by