필터 지우기
필터 지우기

Structuring and importing heterogeneous data in MATLAB?

조회 수: 2 (최근 30일)
Joel Bluhme
Joel Bluhme 2021년 2월 2일
댓글: Ive J 2021년 2월 2일
Hi,
I wish to import data from three spreadsheets regarding patient data into the most suitible MATLAB structure for further modelling and examination. The spreadsheets are structured like this:
  • BASELINE spredsheet: Contains one row per patient, the columns contain baseline data for each patient and includes a personal identifier for that individual
  • SURGICAL spreadsheet: Contains multiple rows per patient (could be 5 entires for one individual and 2 for another depending on surgeries completed), each row contains a personal identifier which indicates on which patient the row relates to
  • EVALUATION spreadsheet: Contains multiple rows per patient (could be 5 entires for one individual and 2 for another depending on evaluations completed) ,each row contains a personal identifier which indicates on which patient the row relates to
I have looked at the documentation and examples for structure arrays, tables and datasets array and understand the different uses for them. From my understanding, structure arrays seems like the best way to structure this data? Also, I don't understand how MATLAB can help with matching the relevant rows in SURGICAL and EVALUATION with the relevant person in BASELINE through traversion or similarly. In simplistic terms, is it possible to have something similar to
JohnDoe.surgeries.1 = returns all columns for John Doe's first surgery
JohnDoe.surgeries.2 = returns all columns for John Doe's second surgery
And analogous for evaluation?
Best,
Joel
  댓글 수: 1
Ive J
Ive J 2021년 2월 2일
I would merge (see join) all different datasets into a single table, and then use groupsummary or groupfilter as appropriate. Say you've already created such a table, so you can easily access to all data for that patient:
myBiobank(myBiobank.name == "JohnDoe" & myBiobank.surgeryID == 1, :) % show me all data for this person

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by