title: Need help parse error GNU Octave
body: <p>I try writing the linear &amp; nonlinear regression on GNU Octave as a part of my final project for Numerical Method class. Still I have one error in my code it's a simple parse error but I don't know how to fix it. I try to fix the syntax or try change the way I do my coding still stuck.</p>
  
  <pre><code>printf("This program is use for curve fitting\n")
  printf("Please enter the data in the [] by use one space to seperate each element.\n")
  x = input("Enter the data(x group):")
  y = input("Enter the data(y group):")
  mode = input("What kind of fitting you want to do(expo((1),power(2),least-square fitting(3)):")
  switch mode
  case{3}
      xbar = sum(x)/length(x) 
      ybar = sum(y)/length(y)
      xy = x.*y
      xs = x.^2
      a1 = ((length(x)*sum(xy))-(sum(x)*sum(y)))/((sum(xs)*length(x))-(sum(x)^2))
      a0 = ybar-(a1*xbar)
      disp(x)
      disp(y)
      printf("mean of x = %d,mean of y = %d,a1 = %d.a0 = %d",xbar,ybar,a1,a0)
      plot(a0+(a1*x))
  case{2}
      xbar = sum(x)/length(x) 
      ybar = sum(y)/length(y)
      xy = x.*y
      xs = x.^2
      a1 = ((length(x)*sum(xy))-(sum(x)*sum(y)))/((sum(xs)*length(x))-(sum(x)^2))
      a0 = ybar-(a1*xbar)
      alpha = 10^a0
      disp(x)
      disp(y)
      printf("mean of x = %d,mean of y = %d,a1 = %d.a0 = %d,alpha = %d,beta = %d\n",xbar,ybar,a1,a0,alpha,a0)
      plot((alpha.*(x^a1))
  case{1}
      xbar = sum(x)/length(x)
      ybar = sum(y)/length(y)
      xy= x.*y
      xs= x.^2
      a1 = ((length(x)*sum(xy))-(sum(x)*sum(y)))/((sum(xs)*length(x))-(sum(x)^2))
      a0 = ybar-(a1*xbar)
      disp(x)
      disp(y)
      alpha = e^a1
      printf("mean of x = %d,mean of y = %d,a1 = %d.a0 = %d,alpha = %d,beta = %d\n",xbar,ybar,a1,a0,alpha,a0)
      plot(a0*(e^((a1*alpha).*x))
  otherwise
      break;
  end
  </code></pre>
  
  <p>Parse error keep telling that the place where error occur is case{1} but I don't know what the error is. </p>