i have a 3D face image dataset. I want to create a cell where rows represent diff people and columns represent diff expressions.
j=2;k=4;mydata = cell(j,k);for p = 1:j for e = 1:k fname = sprintf('%0%d.txt' , p, e); fid = fopen(fname); A = fscanf(fid, '%f %f %f'); mydata{p,e} = A fclose(fid); endend
For my above code, j represent no of people(this is an example only,real dataset contains 50 people), and k is no of expressions for each people. I named the image as 101 until 104 for the first people, and 201 until 204 for the second people. 'p' represent people and 'e' is expression. However i got an error saying that "error using fscanf.Invalid file identifier". I think the problem arise because it cannot detect which image for 'p' and which one for'e'. But i don't know how to solve this.
Best Answer