title: how to solve this error? 'Assignment has more non-singleton rhs dimensions than non-singleton subscripts'
body: <p>Why can't I assign image to the matrix and project it out? I tried to assign my <code>board(i,j) = tile{1}</code> but it prompts me with an error. How do I solve it?</p>
  
  <pre><code>tile{1} = imread('tw.png','png');
  tile{2} = imread('tb.png','png');
  tile{3} = imread('twpb.png','png');
  
  r = input('key in row: ');
  c = input('key in column: ');
  
  for i = 1:r
      for j = 1:c
       board(i,j) = 1;
  
       if i &gt; 2 &amp;&amp; i &lt; r - 1
               board(i,j) = 0;
  
       elseif i == r - 1 || i &gt; r- 1
           board(i,j) = 2;     
       end
  end
  end
  
  for i = 1:r
     for j =1:c
  
      if board(i,j)==1
              board(i,j) =tile{1};
          elseif board(i,j) == 0
              board(i,j) = tile{2};
      else
          board(i,j) = tile{3};
  
      end
  
     end
   end
  
  disp(board)
  </code></pre>