function cyclelines

% Modification by W. Kaminsky (suggested by V. Anant) 9/20/2006
% For unknown reasons line 36 "line = [line;l(i)]" and the if syntax
% to which it refers are rejected by MATLAB Release 14. Luckily the
% problem disapperas if you simply comment out line 36 and so we have.

% A shamelessly hacked version of PRTLINES by John L. Galenski III
%
% CYCLELINES converts solid lines to various line styles for graphical
% output. The change is transparent to the user. Non-solid lines are not
% affected.

% Create the array of line styles.
styles = [
'- '
'--'
'-.'
': '
];

% Get the Children of the Figure.
a = get(gcf,'children');
% Check the Children of 'a'. If they are
% solid lines, then change their LineStyle
% property.
for j = 1:length(a)
l = sort(get(a(j),'children'));
X = 0;
SI = 0;
Add = 0;
for i = 1:length(l)
if strcmp( 'line', get(l(i), 'type' ))
if strcmp(get(l(i),'linestyle'),'-')
X = X + 1;
%line = [line;l(i)]; For some reason MATLAB Release 14 doesn't like
%this line and for some reason simply commenting out allows everything
%to still work. Hence, we've commented it out.
SI = SI+1;
if SI == length(styles)+1;
SI = 1;
end
set(l(i),'linestyle', styles(SI,:));
end
end
end
end