function plot_feasible_profiles(x, TransformedAFS)
% plots the feasible profiles 
% 
% input:
% x ........ vector of frequencies
% TransformedAFS ........ structure from FACPACK including the feasible
%                         profiles, use e.g. "profiles_from_AFS%D.m" to
%                         computed them
% 
% example:
% plot_feasible_profiles(x, TransformedAFS)
% plot_feasible_profiles(x, profiles)

col = [0     0.4470     0.7410;
    0.8500    0.3250    0.0980;
    0.9290    0.6940    0.1250;
    0.4940    0.1840    0.5560;
    0.4660    0.6740    0.1880;
    0.3010    0.7450    0.9330];

if length(TransformedAFS) == 1
    figure(1)
    plot(x, TransformedAFS{1}, 'k')
else
    for i=1:length(TransformedAFS)
        figure(i)
        plot(x, TransformedAFS{i}, 'color',col(i,:))
        axis tight
        yl = get(gca, 'ylim');
        set(gca, 'xlim', x([1 end]), 'ylim', [min(0, 1.05*yl(1)) 1.05*yl(2)])
        set(gcf,'paperpositionmode','auto')
    end
end
