필터 지우기
필터 지우기

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,:)

추가 답변 (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