In this work, an analysis to perform tree expression reconstruction, and redundant statement elimination is presented for the Matlab language, using the McLab framework. The Matlab language is a popular high-level numerical language use by many scientist and engineers. As a proprietary software, it becomes important to have alternative compilers and execution environments. To make this process efficient, the compiler must have an appropriate IR and many optimizations that are amenable to Matlab. To this end, the McLab framework was brought forward as an Inter/Intra procedural Analysis framework, with its corresponding 3-address-code IR, TameIR. This TameIR framework, although very useful for analysis of code, in terms of generating, the 3-address nature of it generates many unnecessary locals. In this work, an analysis to get rid of unnecessary locals, by means of rebuilding expression trees is performed.