Has anyone encountered a bug (or bugs) in Maple 9's plot functionality? I am using Maple 9 (probably need to upgrade!) and getting odd plots.
For example, I have a procedure called T_opt(x,y,z) that fines the optimal T given parameters (x,y,z), and I have checked the values for X_opt directly. For instance, below we see that T_opt is decreasing in x:
But when I plot T_opt as follows:
the plot shows T_opt increasing in x! Basically, totally wrong values for T_opt are shown in the plot, i.e. not the values above!!
See attached plot.
Note, I have also seen some similar bugginess when using plot3d. Is anyone aware of this problem? Or am I plotting T_opt incorrectly somehow? Thanks.
I am having difficulty with a procedure that takes an Array and returns its maximum element -- and suspect that the difficulty is due to the fact that my Array (called it A) has elements of mixed data type, i.e. some numeric and some "undefined" elements. How do I replace the undefined elements and/or get Maple to work with them?
I was thinking that I could convert them to a placeholder value of 0, since I'm maximizing?
Here's the error message, followed by a slice of my array -- you can see that there's already an undefined elements:
Error, (in maxpt) invalid input: ArrayDims expects its 1st argument, A, to be of type Array, but received [[.2500000000, .3125000000, .3620558262, .4031851184, .4375000000, .4659321892, .4891103366, .5074959503, .5214466094, undefined, .5368923611, .5381944444, .5351562500, .5277777777, .5160590278, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000, .5000000000], [.2947082519, .3533020019, .3989515781, .4361746204, .4665832520, .4911091912, .5103810885, .5248604523, .5349048614, .5406428808, .5417911264, .5383316213,
I have a function that cannot be maximized by taking the FOCs, i.e. non-convex, and I want to maximize it with respect to two variables. Say, with respect to (x,y).
I have found an example where you can extract the maximizer from plot using this approach:
MAX := 0.330385487730942451
MAXPT := [[0.287405284999999956, 0.330385487730942451]]
The above example is for the case where you maximize a function with respect to a single variable, y. (The value of x is fixed above; tau, theta, and omega are parameters of payoff.)
I am trying to plot the following procedure in the variable s_val (with p_val and pa_val at fixed values):
> end proc:
with no luck. I have tried the following variants of plot:
Error, (in plot) invalid plotting of procedures, perhaps you mean plot(Q_opt, .5 .. .59, axes = BOXED)
Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
I have an optimization problem where my integration bounds depend on the maximizer and take the form max[1,Q+pa/2], where Q is the variable that I am maximizing with respect to.
For instance, my function U (utility), which I am maximizing is defined as follows:
I get a piecewise FOC for U, with respect to Q, and I'm able to solve for the optimal Q, given the parameters s, p, and pa, using fsolve. For example: