Plotting function with min/max problem
See original GitHub issueI try to plot:
$Plot{min(3; 14/(9*a)) @ a = 0.1 : 3}
But was: Unexpected error: Index was outside the bounds of the array. Please check the expression consistency. This works correctly:
$Plot{14/(9*a)*(14/(9*a) ≤ 3) + 3*(14/(9*a) > 3) @ a = 0.1 : 3}
So, is it simple mistake or deep calculation problem?
$Area
works nomally with this function, $Integral
doesn’t works too.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Finding the min and max values of a function and marking ...
This is what i have so far to find the points that are zero and mark them on the graph. But i cant...
Read more >Solve minimax constraint problem - MATLAB fminimax
In this case, the solution is not unique. Many points satisfy the constraints and have the same minimax value. Plot the surface representing...
Read more >min max values of plotted function differ from input #302
I need to plot two functions g(x) = 1.842*(x-0.0359)*2.145 and h(x) = 1.417((x-0.0359))**1.751 in the range of x, 0.06 to 0.24.
Read more >Ex: Find the Max and Min of an Objective Function ... - YouTube
This video explains how to find the max and min of an objective function given the graph of the feasible region.
Read more >automatically setting x axis range to min, max x values ...
The range of the x axis seems to get set to the range of the first list of x values that is passed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cser thank you for your feedback. About plot-min, probably it is a minor bug. I will take a look. About $Integral, it must be used only for analytic functions (continuous and smooth) - without jumps or angles. This is how Tanh-Sinh method works. But for such functions, it is many times faster than $Area. I included this into the documentation.
If you have discontinuities (say at point c), you have to separate the integral and sum both parts:
$Integral{f(x) @ x = a : c} + $Integral{f(x) @ x = c: b}
Yes! It works now.