When running Levin's code with his example "Bestsw.mod", I use Dynare v3 and Matlab 2010b.
I type in command Window
>> infilename='Bestsw';
>> outfilename='Bestsw_OUT';
>> get_ramsey
It gives the following error:
??? Undefined function or method 'struct2cell' for input arguments of type 'sym'.
Error in ==> get_ramsey at 119
lmss_coefdefs{icoefdef} = ['lmss_vec(',num2str(iev),') = ',char(struct2cell(tmpval)),';'];
I don't know how to fix it. I'm begging for your help!