Code covered by the BSD License  

Highlights from
Publish dependent and called functions

from Publish dependent and called functions by Nick Angelini
Publish explicitly called functions not found in the MATLAB root. See mfile for limitations.

Volume_Flow( r0 )
function [ Q ] = Volume_Flow( r0 )
%%
% Compuation of volume flow rate in a pipe as a function of radius.
% 
% Syntax: [ Q ] = Volume_Flow( r0 )
%
% input: r0 = radium (cm)
%
% output: Q = volume flow rate (cm^3/s)      

v = @(r) 2*(1 - r./r0).^(1/6);
f = @(r) v(r).*2*pi.*r;

Q = quad(f,0,r0);

Contact us at files@mathworks.com