% RQRE_SAME_SIZE Checks that two variables have exactly the same size % % Issues an error if criterion not fulfilled. % % Only sizes are compared and *a* and *b* can be of different types. % % FORMAT rqre_same_size( a, b ) % % IN a A variable % b A second variable % 2010-01-04 Created by Patrick Eriksson. function rqre_same_size( a, b ) if any( size(a) ~= size(b) ) error( 'The variables %s and %s must have the same size.', inputname(1), ... inputname(2) ); end