Andiguys

65 Reputation

5 Badges

1 years, 65 days

MaplePrimes Activity


These are replies submitted by Andiguys

@sand15 I'm using two different variables—one ranging from 20,000 to 60,000 and the other from 0 to 0.4—but the current syntax doesn't work. Could you help me identify what's going wrong?

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

NULL

`πR` := 1.384512885*10^7+20930000*delta-230*w*delta-79350000*delta^2

13845128.85+20930000*delta-230*w*delta-79350000*delta^2

(1)

`πD` := 1.615473870*10^7-6325000*delta*(1/177)-32269*w*(1/1062)-230*w*delta-529*(690000*delta+w-91500)^2*(1/845883000)-79350000*(2*delta*(1/531)-23*w*(1/15930000)+1403/10620)^2

16154738.70-(6325000/177)*delta-(32269/1062)*w-230*w*delta-(529/845883000)*(690000*delta+w-91500)^2-79350000*((2/531)*delta-(23/15930000)*w+1403/10620)^2

(2)

Di := `πR`-`πD`

-2309609.85+(3710935000/177)*delta-79350000*delta^2+(32269/1062)*w+(529/845883000)*(690000*delta+w-91500)^2+79350000*((2/531)*delta-(23/15930000)*w+1403/10620)^2

(3)

simplify(`πR`-`πD`);  # Note that the diffference does not depend upon g2

solve(%=0)

-919490.4996+20965734.46*delta-79051129.94*delta^2+0.1660389203e-3*w^2

 

{delta = delta, w = 0.1204536862e-4*(0.3281391066e22*delta^2-0.8702819783e21*delta+0.3816780244e20)^(1/2)}, {delta = delta, w = -0.1204536862e-4*(0.3281391066e22*delta^2-0.8702819783e21*delta+0.3816780244e20)^(1/2)}

(4)

# As a rule (IMO) the function to use to compare, let's say a(u, v) and b(u, v) is plots/inequal
# (read the corresponding help page)
# When it appears that a(u, v) - b(u, v) = c(u) using plots:inequal is kind of a hammer to kill a fly,
# nevertheless here is an example:

plots:-display(
  plots:-inequal(
    `πR` > `πD`
    , w=20000..80000
    , delta=0.1..0.4
    , color="Chartreuse"
    , optionsexcluded=[color="Lavender"]
  )
  , plot([[20000, 60000], [0.1, 0.3]], color="Chartreuse", thickness=10, legend=typeset('`πR`' > '`πD`'))
  , plot([[20000, 60000], [0.1, 0.3]], color="Lavender"  , thickness=10, legend=typeset('`&pi;R`' < '`&pi;D`'))
  , axes=boxed
)

 

y := -919490.4996+2.096573446*10^7*delta-7.905112994*10^7*delta^2+0.1660389203e-3*w^2

-919490.4996+20965734.46*delta-79051129.94*delta^2+0.1660389203e-3*w^2

(5)

plot3d(y, w = 20000 .. 80000, delta = .1 .. .4)

 
 

``

Download Regional_plot_sand15_(1).mw

@sand15 Thankyou so much.

Just one more question.

How can I modify the syntax to display crosshatched or shaded grid lines in the plot regions instead of using solid fill colors? For example, similar to the figure below where regions are distinguished by patterned lines—how can I achieve that effect?

@sand15 In the current figure, the y-axis range is too limited, making the ZR line invisible. Is there a way to extend the y-axis range while still keeping the plot within a box?
Also, is it possible to add a horizontal dotted line at y = 0? How can I include that in the plot?
 

restart

with(plots)

``

``

KM1w := 1.773782789*10^7-94*w*(1/3)-(1/3000)*w*(94000-w)-(1/6000)*(94000-w)^2

17737827.89-(94/3)*w-(1/3000)*w*(94000-w)-(1/6000)*(94000-w)^2

(1)

KM2w := 1.705786795*10^7-94*w*(1/3)-(1/3000)*w*(814000-w)-86400000*(47/360-(1/720000)*w)^2

17057867.95-(94/3)*w-(1/3000)*w*(814000-w)-86400000*(47/360-(1/720000)*w)^2

(2)

P4 := plot([KM1w, KM2w], w = 20000 .. 80000, legend = ["ZR", "ZD"], titlefont = ["ARIAL", 15], labels = ["w", "Manufacturer Profit"], labeldirections = ["horizontal", "vertical"], labelfont = ["HELVETICA", 10], color = ["Blue", "Yellow"], linestyle = [solid, longdash], axes = boxed, axesfont = ["HELVETICA", "ROMAN", 9], legendstyle = [font = ["HELVETICA", 9], location = right])

 

``


 

Download QQQQ.mw

@sand15 Thankyou

@sand15 Thankyou

@sand15 Thankyou for the syntax.

I tried adjusting the arrow direction, but it's currently pointing downward. How can I change it to point from the right or the left? Which command should I use for that? 

@acer @sand15

Thank you for the clarification and for taking the time to look into it.

I now understand that Kitonum’s procedure was part of the post and not a built-in command—I must have misunderstood earlier. If anyone has suggestions on what changes I should make to get it working without errors, I’d really appreciate the help.

Thanks again!

@janhardo I already have the results computed, but how can I fetch these values and automatically insert them into a table? What is the correct method or syntax to extract and organize the output data into a structured table format?

@sand15 Thankyou.

@mmcdara 7891 can you help with the problem above?

@sand15This isn't working on my end. I'm getting an error saying 'ContoursWithLabels is not a command in the plots package' when I use your syntax. Also, the command gridelines = false,  doesn't seem to have any effect.

S1_vs_s2_contour_plot.mw

@acer 

I would like to export this table in a document format (Word or PDF), but with the actual values substituted in place of the symbolic bounds (lower and upper).

Could you please guide me on the correct syntax or steps to perform this substitution and export?

@vv The constraint is perpendicular to x-axis, its horizontal?? something is wrong

 

@vv What i meant is constraint C1 and C2 are lines perpendicular to x-axis, How can we draw that in plot function??
I want syntax for that? it will be region right, so how to draw plot with constraints with feasible region.

@vv Can you show syntax for adding constraints in graph?

1 2 3 4 5 6 7 Page 1 of 8