Hi Sainath: as the error message suggests, the variables l1 and m1 are not being used.
To call the code("f1=a1*m1;g1=m1*n1; h1=n1*l1;") as a function, place it in the MATLAB function block. See how to do that below: http://www.mathworks.com/help/stateflow/ug/example-of-a-matlab-function-in-a-stateflow-chart.html. Name the function "f2".