title: RGB to YIQ conversion
body: <p>I wrote code for rgb to yiq conversion.I get results but i don't know if this is correct.</p>
  
  <pre><code>%extract the red green blue elements 
  ImageGridRed = double(ImageRGB(:,:,1))';
  ImageGridGreen = double(ImageRGB(:,:,2))';
  ImageGridBlue = double(ImageRGB(:,:,3))';    
  
  %make the 300x300 matrices into 1x90000 matrices
  flag = 1;
  
  for i =1:1:300
  for j = 1:1:300
  
  imageGR(flag) = ImageGridRed(j,i);
  imageGG(flag) = ImageGridGreen(j,i);
  imageGB(flag) = ImageGridBlue(j,i);
  
  flag = flag+1;
  
  end
  end
  
  %put the 3 matrices into 1 matrix 90000x3
  for j=1:1:300*300
  
  colorRGB(j,1) = imageGR(j);
  colorRGB(j,2) = imageGG(j);
  colorRGB(j,3) = imageGB(j);
  
  end
  
  YIQ = rgb2ntsc([colorRGB(:,1) colorRGB(:,2) colorRGB(:,3)]);
  </code></pre>
  
  <p>I wrote this because the rgb2ntsc function needs mx3 matrix for input.I use the number 300 beacuse the picture is 300x300 pixels.I am going to seperate the picture in blocks in my project so dont give attention to the 300 number because i am going to change that, i put it just as an example.</p>
  
  <p>thank you.</p>