Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! 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!