Last active
November 18, 2015 18:43
-
-
Save ravnoor/f4419f2cbe026b32bbf5 to your computer and use it in GitHub Desktop.
Read controls (NLES-matched) demographic data in Matlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fid = fopen('DemographicNGrouping_for_controls_Data_CT.csv'); | |
C = textscan(fid, '%s%s%d%s%s', 'Delimiter', ',', 'CollectOutput', 1); | |
ID = C{1}(:, 1); | |
path = C{1}(:, 2); | |
age = int32(C{2}); | |
sex = C{3}(:,1); sex(strcmp(sex, 'male')) = {'F'}; sex(strcmp(sex, 'female')) = {'M'}; | |
group = C{3}(:, 2); | |
subject_ID_cont = ID; | |
subject_path_cont = path; | |
Age_cont = age; | |
Sex_cont = sex; | |
fclose(fid); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment