image thumbnail
from Transient Pipe Flow by Housam Binous
Compute the transient velocity profile of a flow in a pipe.

f=trans(x)
function f=trans(x)

global zer n A tau

G=-8;
nu=0;

f=-G/4*(1-x.^2);

for n=1:30
    f=f+A(n)*exp(-zer(n)^2*tau)*besselj(nu,zer(n)*x);
end

Contact us at files@mathworks.com