Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
I would like to plot a function, f(t) in which I previously used a Solve block to find the max/min value for the function. Since I had to put in an intial guess for the function in my Solve block the plot won't plot unless I move it above the solve block. Two questions then...
1. Is there a better way to determine the max/min values for a continous function over a given domain? I am not really sure how to set up the Maximize function for a problem like this.
2. Is there a way to reset a variable to be undefined once you have set it?
See attached example with the questions highlighted in yellow.
Thanks,
Mike
How about the attached for undefining the variable?
Mike
That is interesting...I would have thought that defining t as a global variable would have kept the solve block from working.
Any thoughts on using the Maximize function to find the local value for t where the function is a Max?
Thanks,
Mike
I'm sure there is another way to undefine but cannot think at the moment.
There has been many worksheets past within the forum to find maximum and minimum values. Unfortunately I don't have time at the moment - try searching maxima or minima, you might find the sheets I am referring too.
If you don't find them I'll try and dig them out later.
Mike
Michael Einhorn wrote:
Any thoughts on using the Maximize function to find the local value for t where the function is a Max?
Just put Maximize(P,t) immediately after your initial guess for t (you might have to change the initial guess if you want the result to represent the second peak on your graph though).
Alan
Of course that works I thought he wanted to keep the variable name.
Mike
Thanks All,
I was able to get the Maximize function to work and now I have some good options for the plots.
Mike