def parse_bpr_param_matrix(matrix_filename):
    """
    Parse the BPR parameters ( alpha, beta) for each road type
    (actually CAPINDEX in SQL for some reson) from the MATLAB ASCII matrix
    file generated by the fitbprparams.m script from SpeedflowVoyager CSV data.

    Parameters:
       matrix_filename - filename of the MATLAB save bprparams -ascii file 
    
    Return value:
       list of tuples [(alpha, beta, freeflowspeed)] the BPR parameters for each
       capindex (2,..,19) NB list elements 0 and 1 are dummy, so can
       use capindex startnig at 2 directly
    """
    bpr_param_list = [(0,0,0)] # element 0 unused, line 1 in data also dummy
    bpr_param_list = bpr_param_list + \
    [ tuple([float(x) for x in line.split()]) for line in 
      open(matrix_filename).readlines() ] 
    return bpr_param_list