function [tax, tip, avg] = stateRateMatrix(index)
% Return the tax and tip percentages of a given state.
% index - integer index corresponding to a state, as given by name2index
% tax - state tax percentage given in
% http://taxfoundation.org/article/state-and-local-sales-taxes-2012
% tip - state tip percentage--the average tip rate reported by
% http://www.marketplace.org/topics/your-money/what-do-you-tip.
% -1 is returned for a state for which survey data was not available.
% avg - average tip percentage across all states for which tip data was
% available.

% Matrix stateRates below store all state data. The row ordering
% corresponds to that in function name2index. An entry of -1 indicates
% that no data is available:
% First colum contains the taxation percentage for each state
% Second column contains the average tip percentage in each state.

% State Data
stateRates= ...
[8.33, 20.8;
1.77, 22.5;
9.12, 21.4;
8.58, 17.5;
8.11, 18.8;
7.44, 19;
6.35, 21.3;
0.00, -1;
6.62, 21.5;
6.84, 19.1;
4.35, 21;
6.02, 19.4;
8.20, 20;
7.00, 4.04;
6.81, 18.9;
8.26, 20.5;
6.00, 21.3;
8.85, 18.8;
5.00, 21.25;
6.00, 18.1;
6.25, 19.1;
6.00, 20.3;
7.18, 19.7;
7.00, 18.4;
7.49, 19.4;
0.00, 18.8;
6.77, 18.4;
7.93, 21.5;
0.00, 24.6;
6.97, 19.3;
7.24, 18.4;
8.48, 20.5;
6.85, 19.8;
6.39, -1;
6.75, 20;
8.66, 18.4;
0.00, 19.8;
6.34, 19.6;
7.00, -1;
7.13, 19.1;
5.81, -1;
9.45, 19.2;
8.14, 19.7;
6.68, -1;
6.14, 21;
5.00, 19.8;
8.80, 19.1;
6.00, -1;
5.43, 22.3;
5.34, -1;];

% Add your code below