Message Boards Message Boards

0
|
11135 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

how to draw inequality function?

Posted 9 years ago

Hi all,

I am a still beginner to Mathematica, and try to learn how to draw inequality function, such as x<1/3, y<= 1+x / 2, the range of x and y values should be between 0 and 1. Also, is it possible to fill the space between?

Thanks for your helps in advance.

POSTED BY: genie kim
5 Replies
Posted 9 years ago

Oh, Okay, I really appreciate your reply. :)

Then, if I have 5 inequality functions, then, I can use && between the function for all, such as RegionPlot [function 1 && function 2 && function 3 && function 4 && function 5, {range of function 1} etc. ]

POSTED BY: genie kim

{} signifies a list... as in multiple items to plot. Using && is a logical meaning that both conditions need to be met. You definitely can use a list if you want. Here's what your suggestion (with typos removed) produces:

RegionPlot[{x < 1/3, y <= 1 + x/2}, {x, 0.0, 0.5}, {y, 0, 1.5}]

POSTED BY: Eric Smith
Posted 9 years ago

Oh, Okay, I really appreciate your reply. :)

POSTED BY: genie kim
Posted 9 years ago

Thanks, Eirc.

Can I use {} instead of &&, such as "RegionPlot [{x<1/3,y<=1+x/2},{x,0.5},{y,o,1.5}]" But, I have a slightly different graph?

Also, let's say if there are five inequality functions, then, can I still use the same command: RegionPlot, and fill the space within all the functions?

Thanks!

POSTED BY: genie kim
RegionPlot[x < 1/3 && y <= 1 + x/2, {x, 0, 0.5}, {y, 0, 1.5}]
POSTED BY: Eric Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract