Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Error with Finding Maximum in Mathematica

  1. Mar 5, 2010 #1
    I want to find the maximum of the total of a list of numbers, of which each depends on some variable x. I'm taking the discrete Fourier transform of a set of points of a function, and trying to maximise the sum of the resulting list. Although I can plot the sum of the list as a function of x, when I try to maximise it Mathematica tells me Fourier::fftl:Argument{my list} is not a non-empty list or rectangular array of numeric quantities. The error seems to be associated with taking the discrete fourier transform of a non-numerical quantity. It should be taking this Fourier transform with a range of possible numbers and finding the maximum, but seems to be getting it wrong. Can anyone help?
     
  2. jcsd
  3. Mar 6, 2010 #2
    I'm not sure i understand the problem but you can perhaps convert the set to an interpolating funciton which is essentially a list of numbers to MM.
     
  4. Mar 6, 2010 #3
    That's not quite it. I have a list L={a(x), b(x),....,n(x)}, the discrete Fourier transform gives Fourier[L]={A(x), B(x),..., N(x)} and my function is f(x)=A(x)+B(x)+...+N(x). This function plots perfectly and I can clearly see the maximum, but I want Mathematica to find it for me. So I say FindMaximum[F[x],{x,0}] and get the error mentioned above. It can't evaluate Fourier of x, when x isn't a number.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook