<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278</link>
    <title>MATLAB Central Newsreader - Programming Question</title>
    <description>Feed for thread: Programming Question</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 21 Jun 2009 19:54:02 -0400</pubDate>
      <title>Programming Question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278#659165</link>
      <author>Rafael </author>
      <description>Hello, I am having issues with inputing this equation into matlab.&lt;br&gt;
&lt;br&gt;
basic equation:&lt;br&gt;
M=q^n * ((1-q)/(q))^d&lt;br&gt;
&lt;br&gt;
q and n are both inputs from the user&lt;br&gt;
&lt;br&gt;
d is a hamming distance that is calculated based on a length&lt;br&gt;
&lt;br&gt;
the length is the input n (the length is the number of points on the line)&lt;br&gt;
&lt;br&gt;
depending on the length, each point can have a 1 or 0 entry&lt;br&gt;
&lt;br&gt;
i.e. if n is 2, the length is 2, and each of the two points can have a 1 or 0 entry, therefore there are 4 different arrangements in a length of 2 units&lt;br&gt;
&lt;br&gt;
d is the hamming distance between each of these possible arrangements&lt;br&gt;
&lt;br&gt;
this may seem confusing, but any help would be greatly appreciated, i can clarify any questions that may be asked.</description>
    </item>
    <item>
      <pubDate>Sun, 21 Jun 2009 20:34:01 -0400</pubDate>
      <title>Re: Programming Question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278#659170</link>
      <author>Rafael </author>
      <description>In order to clarify this, I have scanned an example worked out on pen and paper:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://img526.imageshack.us/img526/5264/mutation.jpg&quot;&gt;http://img526.imageshack.us/img526/5264/mutation.jpg&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Thanks again</description>
    </item>
    <item>
      <pubDate>Sun, 21 Jun 2009 20:47:01 -0400</pubDate>
      <title>Re: Programming Question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278#659174</link>
      <author>Sadik </author>
      <description>You seem to have figured out. I am writing the equations in case you haven't:&lt;br&gt;
&lt;br&gt;
q = 0.4;&lt;br&gt;
n = 2;&lt;br&gt;
d = [0 1 1 2;1 0 2 1;1 2 0 1;2 1 1 0];&lt;br&gt;
M=q^n * ((1-q)/(q))^d;&lt;br&gt;
&lt;br&gt;
Best.&lt;br&gt;
&lt;br&gt;
&quot;Rafael &quot; &amp;lt;rrodriguez1989@gmail.com&amp;gt; wrote in message &amp;lt;h1m34q$fod$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello, I am having issues with inputing this equation into matlab.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; basic equation:&lt;br&gt;
&amp;gt; M=q^n * ((1-q)/(q))^d&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; q and n are both inputs from the user&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; d is a hamming distance that is calculated based on a length&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; the length is the input n (the length is the number of points on the line)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; depending on the length, each point can have a 1 or 0 entry&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; i.e. if n is 2, the length is 2, and each of the two points can have a 1 or 0 entry, therefore there are 4 different arrangements in a length of 2 units&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; d is the hamming distance between each of these possible arrangements&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; this may seem confusing, but any help would be greatly appreciated, i can clarify any questions that may be asked.</description>
    </item>
    <item>
      <pubDate>Sun, 21 Jun 2009 20:50:02 -0400</pubDate>
      <title>Re: Programming Question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278#659176</link>
      <author>us</author>
      <description>&quot;Rafael &quot; &amp;lt;rrodriguez1989@gmail.com&amp;gt; wrote in message &amp;lt;h1m5fp$d49$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; In order to clarify this, I have scanned an example worked out on pen and paper:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://img526.imageshack.us/img526/5264/mutation.jpg&quot;&gt;http://img526.imageshack.us/img526/5264/mutation.jpg&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks again&lt;br&gt;
&lt;br&gt;
thanks for the example...&lt;br&gt;
now, where is your ML code...&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Sun, 21 Jun 2009 20:52:01 -0400</pubDate>
      <title>Re: Programming Question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/254278#659177</link>
      <author>Rafael </author>
      <description>Thank you for your response!&lt;br&gt;
&lt;br&gt;
I am trying to figure out how to write a simple program that will take an input of &quot;n&quot; and display a resulting matrix based on the work that I scanned in.&lt;br&gt;
&lt;br&gt;
Thanks!</description>
    </item>
  </channel>
</rss>

