title: Assigning a value to a variable in a loop using Matlab
body: <p>I'm learning Matlab and I'm writing a code to find a specific value according to a condition using 'if'. The value can be easily found, but I want to know this value is created by which elements of array A and B. Unfortunately, I can not use this code. I would really appreciate your attention.</p>
  
  <pre><code>A=[2,7,1,3,10];
  B=[2,7,1,3,10];
  c=1;
  k=0;
  f=0;
  L=length (A);
  for m=1:L-1
    for n=m:L
       if(A(m)./B(n)&gt; 0.09 &amp;&amp; A(m)./B(n)&lt;c)
          c=A(m)./B(n);
          k=A(m);
          f=B(n);
          end
       end
   end
  
  fprintf('the c value is %0.5f',c)
  fprintf('the A(m) value is %0.5f',k)
  fprintf('the B(n) value is %0.5f',f)
  the c value is 0.10000
  </code></pre>