How to convert from 15*15 2D matrix to 1d matrix. This is the code I used but it seems that there is something wrong when I run it because it takes the value of the first row only??
function C=OneCamera(x,y) for i=1:15 for j=1:15 x=1 y=1
d=(i-x)^2+(j-y)^2; if d<36 C(i,j)=1;else C(i,j)=0; end;end;
% S=[1 ,2] B=C(1,:) % Q=C(5,:)
S=[B B] end
Your help is highly appreciated..
Best Answer