Connection matrices for ultradiscrete linear problems