manipulate table containing numeric and string

1 次查看(过去 30 天)
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,:)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Analysis 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