Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

hello, how can I do to divide the image (GTMD16=[1,3,5,6;5,2,3,6;4,1,6,1;1,2,4,4];) data in test database and learning

Asked by BANI tita on 13 Oct 2012
GTMD16=[1,3,5,6;5,2,3,6;4,1,6,1;1,2,4,4];
CC=GTMD16(:);
m = 1:16;
ID = (reshape(m,4,4))';
ID=[1,2,3,4;5,6,7,8;9,10,11,12;13,14,15,16];
for k=1:6
  masque(:,:,k)= double(reshape(CC==k,4,4));
 idclasse(:,:,k) = masque(:,:,k)
   idclase(:,:,k) =  idclasse(:,:,k).*ID;
 m(:,:,k) = idclase((idclase(:,:,k) ~= 0),:,k)
 figure(k), imagesc(masque(:,:,k)),colormap gray, grid on
 figure, imagesc(GTMD16.*masque(:,:,k)), grid on
  nppc(k) = sum(sum(masque(:,:,k)))
  pause

end

0 Comments

BANI tita

Products

No products are associated with this question.

0 Answers

Contact us