Plot surface of constraints: Possibly via Apply or Map Reduce over a list of equationsHow do I treat elements in a list as variables inside a module?variable sized lists and using lists as variablesAppend in For loop does not workPlot the result of Solve for multivalued solutionLast@Accumulate not giving same result as TotalTable and ListPlot3DFinding the slowest decay to a value for a 2D functionUsing Append without creating variableMerging the listsUsing Solve outputs for further calculations
Strategy to pay off revolving debt while building reserve savings fund?
How do you give a date interval with diffuse dates?
Is this Android phone Android 9.0 or Android 6.0?
Arithmetics in LuaLaTeX
How can I help our ranger feel special about her beast companion?
Is it possible to have a career in SciComp without contributing to arms research?
What did Jeremy Hunt mean by "slipped" to miss a vote?
Necroskitter and creatures dying because of placing -1/-1 counters
How would thermophilic fish survive?
Why did my "seldom" get corrected?
How can electric field be defined as force per charge, if the charge makes its own, singular electric field?
Why teach C using scanf without talking about command line arguments?
What makes MOVEQ quicker than a normal MOVE in 68000 assembly?
What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?
Why does a tetrahedral molecule like methane have a dipole moment of zero?
How fast does a character need to move to be effectively invisible?
Demographic consequences of closed loop reincarnation
Why is Google approaching my VPS machine?
How to interpret a promising preprint that was never published?
"Je suis petite, moi?", purpose of the "moi"?
Why won't some unicode characters print to my terminal?
Who determines when road center lines are solid or dashed?
What are the basics of commands in Minecraft Java Edition?
How to belay quickly ascending top-rope climbers?
Plot surface of constraints: Possibly via Apply or Map Reduce over a list of equations
How do I treat elements in a list as variables inside a module?variable sized lists and using lists as variablesAppend in For loop does not workPlot the result of Solve for multivalued solutionLast@Accumulate not giving same result as TotalTable and ListPlot3DFinding the slowest decay to a value for a 2D functionUsing Append without creating variableMerging the listsUsing Solve outputs for further calculations
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
add a comment |
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16
add a comment |
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
list-manipulation equation-solving
asked Mar 26 at 5:33
Esme_Esme_
2861 silver badge8 bronze badges
2861 silver badge8 bronze badges
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16
add a comment |
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16
$begingroup$
Are
A
and B
constrained to be integers?$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
Are
A
and B
constrained to be integers?$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193964%2fplot-surface-of-constraints-possibly-via-apply-or-map-reduce-over-a-list-of-equ%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
add a comment |
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
add a comment |
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
edited Mar 26 at 6:08
answered Mar 26 at 5:45
Henrik SchumacherHenrik Schumacher
65.4k5 gold badges94 silver badges180 bronze badges
65.4k5 gold badges94 silver badges180 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193964%2fplot-surface-of-constraints-possibly-via-apply-or-map-reduce-over-a-list-of-equ%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Are
A
andB
constrained to be integers?$endgroup$
– Chris K
Mar 26 at 8:03
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
Mar 26 at 8:16