title: matlab isosurface error: V must be a 3D array
body: <p>I am trying to use isosurface to plot a surface described by an implicit function:</p>
  
  <pre><code>dvdt0=@(v_i,s_i,w_i)0.1*(-65-v_i)+9*n_i_inf(v_i).^4.*(-90-v_i)...
                 +35*m_i_inf(v_i).^3.*h_i_inf(v_i).*(55-v_i)...
                 +(s_i).*(v_rev_i-v_i) ...
                 +g_M*(w_i.*(-90-v_i));
  [v,s,w]=meshgrid(-80:0.1:50,0:0.01:1,1:0.01:1);
  
  val=dvdt0(v,s,w);
  
  fv=isosurface(v,s,w,val,0);
  </code></pre>
  
  <p>However, I keep getting the error message:</p>
  
  <pre><code>Error using isosurface (line 73)
  V must be a 3D array.
  
  Error in layer (line 9)
  fv=isosurface(v,s,w,val,0);
  </code></pre>
  
  <p>Since "val" is obtained from evaluating the function at the meshgrid, and I doubled checked that "val" is the same size as v,s,w, I'm not sure what is wrong.</p>