Dimension Changes in a Chemomechanical Polymer Containing Ethylenediamine and Alkyl Functions as Selective Recognition Units