I am trying to write a function that inputs takes an array i keep getting this error
??? Undefined function or method 'correlation' for input arguments of type 'uint8'.
here is my function 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) > 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) && (array(i,j) < min))
min=array(i,j);
value2=j;
end;
end
minarray(i)=value2;
end
maxarray
minarray
enter code here
can any one please help me :) thank you