Create scantree.m