MATLAB: How to correspond locations in a nested structured array to locations inside of its nest

clinical reportnested arraystructured array

For example:
patient.name = 'John Doe';
patient.dob = [042557];
patient.date = [040111; 022512];
patient.date.percentages=[ 02 08 09; 23 20 24]
patient.date.notes = ['Treated for diabetic wound ulcer'; 'Treated for obesity and diabetic wound ulcer'];
I want the first value in patient.date to correspond to the three values in patient.date.percentages, and the second value in patient.date to correspond to the next three values. And I want the first patient.date to correspond to the first string in patient.date.notes, etc? For the purpose of adding elements to the end of these arrays (and have them correspond correctly, to draw upon at a later date for patient data?

Best Answer

patient.name = {'John Doe'};
patient.dob = {042557};
patient.date = {040111; 022512};
patient.percentages={ [02 08 09]; [23 20 24]}
patient.notes = {'Treated for diabetic wound ulcer'; 'Treated for obesity and diabetic wound ulcer'};