function ductPicture = astfrictionduct
%  ASTFRICTIONDUCT is a helper function used to plot a schematic of a Fanno
%  flow duct in the example ASTFRICTIONFLOW

%   Copyright 2009-2012 The MathWorks, Inc.
    
x1 = [0 45];

y = [1.5 1.5];

x2 = [45 73.623];

ductPicture = figure('name','ductPicture');


plot( x1, y, 'k', x1, -y, 'k', 'lineWidth', 4)
hold on

plot(x2, y, 'k--', x2, -y, 'k--')

set(gca,'Ytick',[],'Xtick',[0 45],'XtickLabel',{'0 cm (inlet)', '45 cm (outlet)'});

annotation('doublearrow', [0.215 0.6], [0.24 0.24]);
annotation('doublearrow', [0.6 0.85], [0.5 0.5]);
annotation('doublearrow', [0.215 0.85], [0.62 0.62]);

text(0,3,'1')
text(44,3,'2')
text(73.5,3,'*')

text(22,-5,'L')
text(33.5,17,'L_{max_1}')
text(56,11,'L_{max_2}')

axis([-10 80 -10 30])

hold off
