function m_out = erosion_rows( m_in, ntimes ) % FUNCTION M_OUT = EROSION_ROWS( M_IN, NTIMES ) if nargin < 2 error( [ mfilename ' needs 2 input arguments.' ] ); end m_out = m_in; for a = 1:size( m_out, 1 ) m_out( a,: ) = erosion( m_out( a,: ), ntimes ); end