title: vector of n numbers around a specific number
body: <p>I'm trying to do an algorithm in Matlab to try to calculate a received power in dBm of a logarithmic model of a wireless telecommunication system..</p>
  
  <p>My algorithm calculate the received power for a number of distances in km that the user specified in the input and stores it in a vector</p>
  
  <p>vector_distances = { 1, 5, 10, 50, 75 }
  vector_Prx = { 131.5266  145.5060  151.5266  165.5060  169.0278 }</p>
  
  <p>The thing is that I almost have everything that I need, but for graphics purposes I need to plot a graph in where on the x axys I have my vector of receiver power but on the y axys I want to show the same received power but with the most complete logarithmic model (the one that have also the noise - with Log-normal distribution on the formula - but for this thing in particular for every distance in my vector I need to choose 50 numbers with 0.5 distance between them (like a matrix) and then for every new point in the same distance calculate the logarithmic model to later plot in the same graph the two functions, one with the model with no noise (a straight line) and one with the noise.. like this picture</p>
  
  <p>!<a href="http://imgur.com/gLSrKor" rel="nofollow">http://imgur.com/gLSrKor</a></p>
  
  <p>My question is, is there a way to choose 50 numbers with 0.5 distance between them for an existing number?</p>
  
  <p>I know for example, if you have a vector</p>
  
  <pre><code>EDU&gt;&gt; m = zeros(1,5)
  
  m =
  
       0     0     0     0     0
  
  EDU&gt;&gt; v = 5 %this is the starter distance%
  
  v =
  
       5
  
  EDU&gt;&gt; m(1) = 5
  
  m =
  
       5     0     0     0     0
  
  % I want to create a vector with 5 numbers with 0.5 distance between them %
  EDU&gt;&gt; for i=2:5
  m(i) = m(i-1) + 0.5
  end
  EDU&gt;&gt; m
  
  m =
  
      5.0000    5.5000    6.0000    6.5000    7.0000
  </code></pre>
  
  <p>But I have two problems, the firs one is, could this be more simplex? I am new on Matlab..and the other one, could I create a vector like this (with the initial number in the center)</p>
  
  <pre><code>EDU&gt;&gt; m
  
  m =
  
     4.0000   4.5000   **5.0000**    5.5000   6.0000
  </code></pre>
  
  <p>Sorry for my english, and thank you so much for helping me</p>