title: Undefined function or method for input arguments of type 'uint8'.
body: <p>I am trying to write a function that inputs takes an array
  i keep getting this error </p>
  
  <p>??? Undefined function or method 'correlation' for input arguments of type 'uint8'.</p>
  
  <p>here is my function code</p>
  
  <pre><code>enter code here
  function[] = correlation (images)
  array=zeros(10);
  for i= 1:10
      for j= 1:10
          if(i ~= j)
              array (i,j)=corr2(images(:,:,i),images(:,:,j));
          end;
      end
  end
  maxarray=zeros(1,10)
  for i= 1:10
      value=1;
      max=array(i,1);
      for j= 2:10
          if(array(i,j) &gt; max)
              max=array(i,j);
              value=j;
          end
      end
      maxarray(i)=value;
  end
  
  
  minarray=zeros(1,10)
  
  for i= 1:10
      min=1;
      for j= 1:10
          if((i~=j) &amp;&amp; (array(i,j) &lt; min))
              min=array(i,j);
              value2=j;
          end;
      end
     minarray(i)=value2;
  end
  
  maxarray
  minarray
  
  enter code here
  </code></pre>
  
  <p>can any one please help me :)
  thank you</p>