%% Compare Against Multiple Values
% Determine which type of plot to create based on the value of plottype. If plottype is either 'pie' or 'pie3', create a 3-D pie chart. Use a cell array to contain both values.

x = [12 64 24];
plottype = 'pie3';

switch plottype
    case 'bar' 
        bar(x)
        title('Bar Graph')
    case {'pie','pie3'}
        pie3(x)
        title('Pie Chart')
    otherwise
        warning('Unexpected plot type. No plot created.')
end

% Copyright 2012 The MathWorks, Inc.