I believe this is what you are looking for: https://github.com/ArduPilot/pymavlink/blob/7b0d51cca7e75b3cf84f5dbb74e76f727816e50d/tools/mavlogdump.py
Alternatively, Misison Planner, under the “Dataflash” tab, has converters to CSV and MATLAB formats.