                    int = findobj(p1.interacts,<span class="string">'elem2'</span>,w);

                        <span class="comment">% Compute separation between elements</span>
                        int.kinemat = int.kinemat.setRelPos(p1,w);

                        <span class="comment">% Check if wall is within verlet distance</span>
                        <span class="comment">% Assumption: particle do not go directly from</span>
                        <span class="comment">% interaction to outside