MATLAB Answers

contour of streamfunction for fluid flow

Asked by Ignatius Fernandes on 19 May 2013

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 )

for i=2:n-1;j=2:m-1;

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


Log in to comment.


No products are associated with this question.

0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!