MATLAB: How to plot a hyperplane of a three-variable equality

hyperplanemultivariable equality

I have the following equality:
Where the variables are , the parameters are , and after substituting values for , the result should be C. How can I solve and plot an equality like this one?
I have tried several approaches, but no mentionable success has happened so far.
I need the solution on a certain (finite) interval for each variables, preferably with an adjustable resolution. It does not necessarily have to be an analytical solution, numerical is just as fine, the point is to produce an acceptable plot.

Best Answer

  • You are trying to visualize 4D data. The best solution for such data points is to use slice(): or contourslice(): For example
    [x1, x2, x3] = meshgrid(linspace(-1, 1)); % range from -1 to 1 for all variables
    Y = 2;
    Sf = 3;
    C = - 1/Y*x1.*x3 - (x2.*x3 - Sf*x3);
    slice(x1, x2, x3, C, [-0.5 0.5], [0 0.7], [-0.7 0 0.5])
    shading interp