Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I can't remember hence the silly question. If one has a continuous function (in my case of time) and one wants to only return the max (absolute) value of the function (range 0..tend), does one needs to discretize the function?
a example
y(t):t^2 wit t = 0..5
max(y(t)) does not return 25
Solved! Go to Solution.
I don't think you do if you've got Premium Prime (ie, not Express). You can use a solve block or maximize function, as described in:
If it's an analytic function, then you could also either try using symbolic differentiation to find the maximum (1st and 2nd derivatives)
Stuart
Make sure t is a vector not a range variable:
Alan
You need to be careful how many points you evaluate a function over when looking for its maximum within a given range.
If you don't have enough points, you will not likely get the prize of picking the right maximum or even seeing most of them.
Here's the difference between 0..5 and 0,0.01..5. Quite different beasts.
Stuart
Thanks for the info.