title: Error using ==> plot Vectors must be the same lengths
body: <p>So I have the following two functions:</p>
  
  <pre><code>delta_t=T/N_time; 
  delta_x=1/N_space; 
  rho=delta_t/delta_x^2;
  phi=zeros(N_space+1,N_time+1);
  phi(:,1)=initial_condition((0:N_space)*delta_x);
  for j=1:N_time;
      for i=2:N_space;
      phi(i,j+1)=rho*(phi(i-1,j)+phi(i+1,j))+(1-2*rho)*phi(i,j);
      end;
  end;
  phi = phi(end,:);
  end
  </code></pre>
  
  <p>When I run my second function, I get this error:</p>
  
  <p>Error using ==> plot Vectors must be the same lengths.</p>
  
  <p>I don't know why the sizes are different. They should be the same since the second function calls the first function. Any help would be much appreciated.</p>