%function PlotPlane(p0,u,v);

% Sample values
% p0 = [1,0,0]'
% u = [1,1,2]';
% v = [2,3,1]';

hold on;


% Vectors parallel to plane
vp = u-v
up = u-5*v

% Variables
syms x y z

% Generic point on plane
w = [x;y;z] 

% Conj-free dot product
realdot = @(u,v) transpose(u)*v;

% The normal vector
n = cross(vp,up);

% The equation of the plane in x,y,z
planefunction = realdot(n,w-p0)

% The equation of the plane solved for z
z_plane = solve(planefunction,z)

% Plot plane
K = 100;
ezmesh(z_plane,[-K,K,-K,K])
title('Solution Space to Rank 2 system');


