This document describes a compiler called MEGHA that automatically compiles MATLAB programs to enable synergistic execution on heterogeneous processors with CPUs and GPUs. The compiler identifies data parallel regions of the MATLAB program and maps them to kernels that can execute on either the CPU or GPU. It uses graph clustering and scheduling heuristics to optimize kernel mapping and minimize data transfers between processors. The authors implemented MEGHA and found it achieved a geometric mean speedup of 19.8X over native MATLAB execution on data parallel benchmarks.