Plotting planes from set of linear equations

Hi,
How can I plot the 3 planes of a set of linear equations:
By plotting it easier to determine if there is one, infinte or zero solutions
example
x - 2y - 3z=0
2y + z = -8
-x + y + 2z = 3
To find the solution I define the matrix and use reduced row echolon form function:
A =
1 -2 -3 0
0 2 1 -8
-1 1 2 3
>> rref(A)
ans =
1 0 0 -4
0 1 0 -5
0 0 1 2

 Accepted Answer

fimplicit3(@(x,y,z) x-2*y-3*z,'EdgeColor','none','FaceColor','b')
hold on;
fimplicit3(@(x,y,z) 2*y+z,'EdgeColor','none','FaceColor','g')
fimplicit3(@(x,y,z) -x+y+2*z,'EdgeColor','none','FaceColor','r')
hold off

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Products

Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!