title: Plotting Surfaces With 3 Symbolic Variables
body: <p>First, I need to state that I'm not exactly a math lover or an avid Matlab user. This is college homework that I have been trying to solve for the last 3 hours with no luck. I have googled like crazy, even asked for help via Facebook (where I got replies, but nothing that solved my questions).</p>
  
  <p>This is my first time using this software and I need to graph some things really quick. But no matter how much I read I keep getting syntax errors and the like.</p>
  
  <p>Basically, I have this equation:</p>
  
  <pre><code>4*x^2 + y^2 + z^2 - 8*x + 2*y + 3 = 0
  </code></pre>
  
  <p>And I'm trying to plot it/graph it. I thought it would be very straightforward but I'm having problems doing it.</p>
  
  <p>Google searches have shown me the functions ezplot() and ezsurf(), but:</p>
  
  <p>When I do ezplot('4*x^2 + y^2 + z^2 - 8*x + 2*y + 3'), I get the following error:</p>
  
  <pre><code>??? Error using ==&gt; char
  Cell elements must be character arrays.
  Error in ==&gt; ezplot at 158
        fmsg = char(f);
  </code></pre>
  
  <p>And when I do ezsurf('4*x^2 + y^2 + z^2 - 8*x + 2*y + 3')</p>
  
  <pre><code>The expression 4*x^2 + y^2 + z^2 - 8*x + 2*y + 3 must only have 2 symbolic variables
  Error in ==&gt; ezgraph3&gt;surfplot at 526
  [F,var] = ezfixfun(F,fargs,flabel);
  Error in ==&gt; ezgraph3 at 49
     [dummy,h] = surfplot(f,domain,surfstyle,cax,Npts,fixdomain,flabel,fargs);
  Error in ==&gt; ezsurf at 65
      h = ezgraph3('surf',args{:});
  </code></pre>
  
  <p>Again, this is really my first time using this software. The teacher didn't give us any explanation so I have no idea of what these errors are supposed to mean, let alone solving them. I have no idea of what I'm doing or what I am supposed to do.</p>
  
  <p>I have tried using solve() to solve for 'z' first and then plot the two results I get.</p>
  
  <pre><code>s = solve('4*x^2 + y^2 + z^2 - 8*x + 2*y + 3', 'z')
  s =
     -(- 4*x^2 + 8*x - y^2 - 2*y - 3)^(1/2)
      (- 4*x^2 + 8*x - y^2 - 2*y - 3)^(1/2)
  </code></pre>
  
  <p>But that's not working either. When I use ezplot() it tells me to use ezsurf, and when I use ezsurf() it tells me about a variable "h" that I have never even declared:</p>
  
  <pre><code>&gt;&gt; ezsurf('-(- 4*x^2 + 8*x - y^2 - 2*y - 3)^(1/2)', '(- 4*x^2 + 8*x - y^2 - 2*y - 3)^(1/2)')
  ??? Undefined function or variable "h".
  Error in ==&gt; ezgraph3 at 66
      hh = h;
  Error in ==&gt; ezsurf at 65
      h = ezgraph3('surf',args{:});
  </code></pre>
  
  <p>Any help plotting that will be really appreciated. My head is going to explode because people have been telling me this is supposed to be really straightforward.</p>
  
  <p>Thank you!</p>