title: How do I use map with custom function in Octave?
body: <p>Assume I have a collection <em>A</em>:</p>
  
  <pre><code>A = [0:6:100]
  </code></pre>
  
  <p>And I have a function <em>fib(n)</em>:</p>
  
  <pre><code>function retval=fib(n)
     g1=(1+5^.5)/2
     g2=(1-5^.5)/2
     retval=(1/5^.5)*(g1^n - g2^n)
  endfunction 
  </code></pre>
  
  <p>I intend to be able to apply <em>fib(n)</em> on <em>A</em>, and store it in a collection say B, where <em>B[i,j]</em> is <em>(i,fib(i))</em>, so I can plot <em>i</em> vs <em>fib(i)</em> and see the results on a graph.</p>
  
  <p>Please advise on how I can use <em>map</em> to obtain this desired collection <em>B</em>.</p>