<span class="comment">% where X(:,:,1,j) is the j'th image</span>
<span class="comment">% Suppose that X are numbers between 0 and 255.</span>
<span class="comment">% Then, create trainImages by</span>
<span class="comment">%   fid = fopen(trainImages,'wb'); fwrite(fid,X(:),'uint8'); fclose(fid);</span>
<span class="comment">% To create the label file, suppose we have k classes and let Y be a matrix</span>
<span class="comment">% with Y(:,i) being all zeros vector except 1 in the position j, where j is</spa