Plotting a function
<p>I have a function (the hill function) when <code>X</code> and <code>K</code> are the same (<code>x==k</code>) the output should be <code>0.5</code>, when I test the function it gives a result of <code>0.5</code>, when I try to plot it, I do not get <code>0.5</code> for my <code>Y</code>. Can anyone explain what I am doing wrong?</p>

<pre><code>n = 1;
k = 1;
x = [0:0.01:2].';

y = (x.^n)/((x.^n)+(k.^n));
plot(x,y);
</code></pre>