<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Basic number problem' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Basic number problem' posted on the 'Matlab' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 00:57:46 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 00:57:46 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Basic number problem</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/429286/429286/basic-number-problem/</link>
      <description>Hi, new to this forum and quite the novice at MatLab.  Anyway, I am trying to analyze the RGB of images.  I made some quick code to look at three squares of one image, taking the sum of each RGB.  However, the matrix results are always 255.  I read that in MatLab I don't have to declare variable types, but something isn't right; the numbers should be much larger.  Here's the code:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;clear
t='c:\users\my.self\desktop\test\IMG_0001.jpg';
h=[700, 1020, 1450];
v=1700;
rcol=0;
gcol=0;
bcol=0;
mag=zeros(3);
q=imread(t);
for i=1:3
    ybeg=h(i);
    for x=v:v+50
        for y=ybeg:ybeg+50
            rcol=q(x,y,1);
            gcol=q(x,y,2);
            bcol=q(x,y,3);
            mag(i)=mag(i)+rcol+gcol+bcol;
        end
    end
end
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
So looking at 50x50 grids.  Any ideas?  Thanks.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/429286/429286/basic-number-problem/</guid>
      <pubDate>Tue, 21 Aug 2012 13:08:13 -0700</pubDate>
      <category>Matlab</category>
    </item>
  </channel>
</rss>