ezplane

Version 1.0.2 (1.58 KB) by Matt J
Plot an arbitrary 3D plane given its equation.
1 Download
Updated 1 Apr 2024

View License

This submission provides ezplane(), a simple function for plotting a plane given its equation. The equation is represented as a 1x4 vector. Namely, the plane A*x+B*y+C*z+D=0 would be plotted with the syntax ezplane([A,B,C,D]).
Note that the plane needn't necessarily be expressible as a surface z(x,y), as illustrated by Example 2 below. Note also that this function deliberately avoids the use of fimplicit3(), which at this time has problems rendering planes.
Example 1: The unit simplex
ezplane([1,1,1, -1]);
xlabel x; ylabel y; zlabel z; grid on;axis equal
axis([0 1 0 1 0 1]*1.3)
Example 2: Pass additional arguments specifying surface properties
ezplane([1,1/2,0, -1],'FaceColor','red');
xlabel x; ylabel y; zlabel z; grid on;axis equal
axis([0 1 0 1 0 1]*2.1)

Cite As

Matt J (2024). ezplane (https://www.mathworks.com/matlabcentral/fileexchange/161351-ezplane), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.2

Bug in argument check. Sometimes eqnCoeff vector mistaken for graphics handles.

1.0.1

Description update

1.0.0