function p=change_parities(p, start ) for i = start:-2:1 p( i ) = 1-p( i ); end