Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello
We are trying to integrate a function which contains a vector for wave frequency (omega) with respect to length (y). We need help programming the integral so that it gives a value of each value of omega. Currently it either gives us a single value, or says the solution does not converge.
Any help would be greatly appreciated!
Kind regards,
James and Daniel



Use your index, calculate each one:

You can turn the integral into a function and vectorize the function:

As Mark has said, you are better off defining a series of functions that calculating a large number of intermediate results, and then evaluating that function at the end.
Thanks all!
