Dear all,
When I try running the following code:
.....syms tmpval;for iev = 1:nendog; vname = char(endocmat(iev)); vname0 = [vname,'_0']; tmpstring = ['diff(Util,',vname0,')']; lmss_string = tmpstring; for jlag = 1:maxvleads(neqs-1,iv); lmss_string = [lmss_string,' + ((1/nbeta__)^',num2str(jlag),')*(',tmpstring,')']; end; for jlead = 1:maxvlags(neqs-1,iv); lmss_string = [lmss_string,' + (nbeta__^',num2str(jlead),')*(',tmpstring,')']; end; eval(['tmpval = sym(0) + ',lmss_string,';']); lmss_coefdefs{icoefdef} = ['lmss_vec(',num2str(iev),') = ',char(struct2cell(tmpval)),';'];end;
The error message displays on the command window;
??? Undefined function or method 'struct2cell' for input arguments of type 'sym'.
My matlab version is 2012(b). Although the code is not complete, it dosen't change the problem.
Thank you for your help.
Best Answer