To use this, first start Comsol. Within Comsol, "File : Client/server/MATLAB : connect to MATLAB". A matlab window opens up. In the matlab window, go to the proper directory and execute file fit4Davg.m.
The top routine is fit4Davg.m . It reads in the data files ..\averages\sidemedia.txt and ..\averages\centermedia.txt, which are the averaged measured displacement on a lattice. It uses matlab routine lsqcurvefit with the error function CenterSide4Dmkh.m to optimize the Young's moduli; this routine uses center4Dmkh.m and Side4Dmkh.m
YM.zip is a zip file with the code and data files.