Measurement of ionic concentration profiles in membranes during transport