first draft of matlab DPG