Hi all! I am a bit new to matlab; I am trying to plot contour of streamfunction and tried following steps:
1. first created a m-function as follows:
function [ psi ] = flowfun( u,v )
u(i,j)=-(psi(i,j+1)-psi(i,j-1))/(2*dy); v(i,j)=(psi(i+1,j)-psi(i-1,j))/(2*dx); end end 2. tried plotting the streamlines using contour as follows: z = psi(1:n,1:m); x = linspace(0,1,size(z,2)); y = linspace(0,1,size(z,1));
but did not get any contour.. just wanted to know whether I am doing it correctly. if not, what will be the best way to plot streamlines of fluid flow.
any comments will be of great help. thank you