title: MTIMES is not fully supported for integer classes. At least one input must be scalar
body: <p>I'm trying to implement a 1 dimensional DFT without using Matlab built-in functions such as fft(). This is my code</p>
  
  <pre><code>function [Xk] = dft1(xn)
  N=length(xn);
  n = 0:1:N-1; % row vector for n
  k = 0:1:N-1; % row vecor for k
  WN = exp(-1j*2*pi/N); % Twiddle factor (w)
  nk = n'*k; % creates a N by N matrix of nk values
  WNnk = WN .^ nk; % DFT matrix
  Xk = (WNnk*xn );
  </code></pre>
  
  <p>when i run the code after using the following commands:</p>
  
  <pre><code>I = imread('sample.jpg')
  R = dft1(I)
  </code></pre>
  
  <p>I get this particular error:
  <strong>Error using  * 
  MTIMES is not fully supported for
  integer classes. At least one input
  must be scalar.
  To compute elementwise TIMES, use
  TIMES (.*) instead.</strong></p>
  
  <p>Can someone please help me to figure out how to solve this problem</p>
  
  <p>Note: I am still in the very beginning level of learning Matlab 
  thank you very much</p>