I had the same problem a couple of weeks ago: apparently there isn't a simple function that can be called as getAttributes only returns data from the content table.
I wrote the code below to get data for all matrix fields within an entry, but later on I realised that there are other fields which appear null from getAttributes such as asset and entry fields.
Anyone else have a rock-solid method for all data?
$content = $entry->getContent();
$data = $content->getAttributes(null,true);
// Getting content / attributes doesn't appear to work for Matrix fields? - get content and re-populate data array
$matrixFields = craft()->db->createCommand()->select(array('handle'))->where( array('type' => 'Matrix') )->from('fields')->queryAll();
foreach( $matrixFields as $matrix )
$handle = $matrix['handle'];
if( $entry->$handle )
$attributes = array();
foreach( $entry->$handle as $matrix )
$attr = $matrix->getContent()->getAttributes();
// Attribute Formatting (this is formatting for my use-case - feel free to amend as you need)
unset( $attr['id'] , $attr['elementId'] , $attr['locale'] , $attr['title'] );
$attr = array_merge( $attr , array("___type" => $matrix->type->handle ) );
$attributes = $attr;
$data[$handle] = $attributes;