FOR LOOP WITH CELLS: Index exceeds the number of array elements. Index must not exceed 3.
Show older comments
Dearest,
I am unable to solve this error.
I have to compute the mean of voxel, of three lesions(nameLesion_list), in six different "brain maps"(nameMaps_list).
When I run the for loop my command window shows: "Index exceeds the number of array elements. Index must not exceed 3".
I understand that is for the nameLesion_list that is array of three elements but I don't know how I can operate differently with it.
Thank you for your help.
nameLesion_list={lesion_mask_TP0,lesion_mask_TP1,lesion_mask_TP2};
nameMaps_list={mtr_TP0,mtr_TP1,mtr_TP2,mtsat_TP0,mtsat_TP1,mtsat_TP2};
maps_list={mtr_T0_labels,mtr_T1_labels,mtr_T2_labels,mtsat_T0_labels,mtsat_T1_labels,mtsat_T2_labels};
for i_maps=1:length(maps_list)
temp_map=maps_list{i_maps};
temp_nameMap=nameMaps_list{i_maps};
temp_nameLesion=nameLesion_list{i_maps};
[mean_map_lesion,std_map_lesion]=mean_std_map_x_ROI_accorpate(temp_nameMap,temp_nameLesion,ROI_labels.CellLabelNumber);
T_mean_maps.(['mean_' temp_map])=mean_map_lesion(:);
T_std_maps.(['std_' temp_map])=std_map_lesion(:);
end
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!