...
I (Our primary recommendation, formerly option C). A new CIFTI library has been written for matlab, which is backwards compatible with ciftiopen, etc from option II, but provides information about the full CIFTI XML header information similar to how it is stored in the file (which encodes what each CIFTI index represents), and helper functions to extract or replace data for a specific structure. There are no external dependencies when reading CIFTI-2 files, which should cover all HCP CIFTI files in virtually all data releases. To read CIFTI-1 files with this code, install Connectome Workbench v1.0 or newer, available here. This library is available at https://github.com/Washington-University/cifti-matlab.
...
III (formerly option A). PLEASE DON'T USE THIS OPTION WITH HCP MRI DATA. Using the code developed for the HCP megconnectome data analysis pipelines that are implemented using the FieldTrip toolbox. The code is available in stand-alone format from https://github.com/Washington-University/cifti-matlab/releases/tag/v1-final. This approach loads most of the complete CIFTI CIFTI XML header information into a FieldTrip-derived MATLAB structure, including information on what each CIFTI index represents, however it also alters the data matrix, adding NaN values in the medial wall. Where possible it will also load gifti surface files.
...