Error with Finding Maximum in Mathematica

  • Mathematica
  • Thread starter madness
  • Start date
  • #1
651
12

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
489
0
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.
 
  • #3
651
12
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.
 

Related Threads on Error with Finding Maximum in Mathematica

Replies
1
Views
7K
  • Last Post
Replies
6
Views
3K
Replies
0
Views
2K
Replies
13
Views
10K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
23
Views
4K
Replies
3
Views
3K
  • Last Post
2
Replies
34
Views
2K
Top