MATLAB: Inputs functions for CELL

inputs functions for cell

i want to insert a path of image in a cell .
for i = 1:event_num
img_list=fprintf('.\WIDER_train\images\%s\%s',data.event_list{i},data.file_list{i});
img_num = size(img_list,1);
bbx_list = data.face_bbx_list{i};
trainingData = [trainingData;[img_list,bbx_list]];
end
Error using fprintf
Function is not defined for 'cell' inputs.

Best Answer

data.event_list{i} or data.file_list{i} contains a cell array and needs to have single entries selected from them.
Normally {i} would be enough, but sometimes people accidentally end up with multiple levels of cell where they only expect one level. You should look at what is contained in data.event_list{i} or data.file_list{i}