Trying a way to output the entire tree and maybe plot it in matlab