# Plotting multiple planes with three variables in 3D using MATLAB

I couldn’t figure out, how I could plot three different equations with three variables, namely x,y and z in MATLAB or any other Mathematical Softwares. I know that there’s a way we could plot multiple curves with two variables in MATLAB, but is there any alternative for 3D graphs, as such?

The question is related to Graphical Method in Linear Programming with 3 variables. These are the equations I need to plot in 3D, along with positivity constraints, ie. x=0, y=0 and z=0

x+y+z=450
7x+5y+13z=3000
0.05x+0.1y+0.2z=55


I tried researching a lot about 3D graphical method, but I just found that it’s too difficult to find the solution, hence we use Simplex method, as it is more efficient, but is it possible that this could also be solved by a graphical method, as such.

I also tried using CDF Player for Mathematica, but to no avail. Could anyone tell me if I could plot them manually too, as it seems 3D plotting is too difficult to do by hand.

Mathematics Asked on December 31, 2020

$$x+y+z=450$$ isn't a function (well, it is an implicit curve), while

$$z=450-x-y$$

is. You can plot it using the following code:

x=[0:1:10];
y=[0:1:10];
[X,Y]=meshgrid(x,y);
Z=450-X-Y;
surf(X,Y,Z)


You can also remove the positive values of $Z$, by using a little trick:

Z(Z<0)=nan;


Here, you are setting all negative values of $Z$ to Nan. Nan is skipped by Matlab when you plot something.

Answered by the_candyman on December 31, 2020

## Related Questions

### Tangent Bundle of Product Manifold

1  Asked on January 5, 2022

### Partial Sums of Geometric Series

5  Asked on January 5, 2022

### What does it really mean for a model to be pointwise definable?

1  Asked on January 5, 2022

### $(A^ctimes B)cup(Atimes B^c)cup(A^c times B^c)=(A^ctimes Y)cup(Xtimes B^c)$

1  Asked on January 5, 2022 by yahya-b-jaber

### Line Integral gives no work done?

3  Asked on January 5, 2022

### Is this proof of propositional logic valid

2  Asked on January 5, 2022 by mauricio-vega

### How can I study the convergence of the improper integral $int_{0}^{ infty} frac{sin(x)}{x+1} , mathrm dx,$?

4  Asked on January 5, 2022 by kirito

### Find all integer values of $a$ such that $a^2 – 4a$ is a perfect square

3  Asked on January 5, 2022 by hardik-ddod

### Solving equation $y^2-2ln(y)=x^2$

1  Asked on January 5, 2022 by majdgh

### A sequence $f_n to f$ uniformly on $(0,1)$ where $f, f_n in C([0,1])$ implies $f_n(0) to f(0)$, $f_n(1) to f(1)$.

0  Asked on January 5, 2022 by cyceez

### Show that if a Banach space is generated by a countable set with finite dimension then it has finite dimension

1  Asked on January 5, 2022

### Can $a bmod 3$ be represented arithmetically without the mod or other integer-related functions?

2  Asked on January 5, 2022

### When is $sum_{i=1}^{m}i^n =0 bmod dfrac{m(m+1)}{2}$?

0  Asked on January 5, 2022

### My proof of $A^{mathrm{c}}$ is closed iff $A$ is open

1  Asked on January 5, 2022 by mathematicaxyz

### Define $X_n=sum_{k=1}^n kx_k$ and $Y_n=sum_{k=1}^n ky_k$. Prove that there exists an $n$ such that $X_n<Y_n$.

2  Asked on January 5, 2022

### Find the values of $k$ that satisfy $gcd(a,b)=5$

2  Asked on January 5, 2022 by ricin

### How find the solution to $sum_{i=1}^{infty} left( frac{1}{2} right)^i left( frac{1}{i}right)$?

2  Asked on January 5, 2022

### Closed form for the maximum of the two-variable function $(a x + (1 – a) y) (b (1 – x) + (1 – b) (1 – y))$

0  Asked on January 5, 2022

### Interesting connection between a word problem and a physics formula

0  Asked on January 5, 2022