title: Fitting in gnuplot with three variables
body: <p>I am trying to fit some data using gnuplot.</p>
  
  <p>Here is the data (variables h, k,l and I): </p>
  
  <pre><code>#h  k   l   I
  
  2   1   1   7807
  2   2   0   9664
  3   2   1   6042
  4   0   0   1394
  3   3   2   1358
  4   2   0   4896
  
  ### Function
  I(h,k,l) = M * (F * ( (sin(A*pi*sqrt(h*h+k*k+l*l)*L))/(A*2*pi*sqrt(h*h+k*k+l*l)) ))^2
  
  ### Initial values
  M=1
  F=0.5
  A=1
  L=1
  
  ### Fitting 
  fit I(h,k,l) "cavendish.data" using 1:2:3 via M, F, A, L
  </code></pre>
  
  <p>I want to determine the constants M,F,A and L from this fitting.</p>
  
  <p>When I run this code I get message <strong>undefined variable: h</strong></p>
  
  <p>How can I could determine the variables. Thanks in advance.</p>