Question: How to calculate time and memory

Dear Users!

I hope everyone is fine here. In the attached file I have solved a partial differential equation using the finite difference method for different mesh in spatial directions (i.e., for different Mx). I want to compute the time and memory to compute the solution against each Mx and want to plot it. Kindly help me how to compute the time and memory for each value of Mx.

I shall be waiting. Thanks in advance. 

Please Wait...