Clear Filters
Clear Filters

Structuring and importing heterogeneous data in MATLAB?

2 views (last 30 days)
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 Comment
Ive J
Ive J on 2 Feb 2021
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

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!