diff --git a/matlab/load_m_file_data_legacy.m b/matlab/load_m_file_data_legacy.m index 38c0d5f4ca4a16fa93be9535d8ad8ed5a9195569..7374c2ab21f4ff35bee52f15068638c157048345 100644 --- a/matlab/load_m_file_data_legacy.m +++ b/matlab/load_m_file_data_legacy.m @@ -17,7 +17,14 @@ function data = load_m_file_data_legacy(datafile, varobs) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -eval(datafile(1:end-2)) +cXDHdrXnqo5KwwVpTRuc6OprAW = datafile(1:end-2); +[pathtocXDHdrXnqo5KwwVpTRuc6OprAW,cXDHdrXnqo5KwwVpTRuc6OprAW,junk] = fileparts(cXDHdrXnqo5KwwVpTRuc6OprAW) + +OvMuQsJgjwzYG5Pni0TzU8Acb2YBJva = pwd(); +cd(pathtocXDHdrXnqo5KwwVpTRuc6OprAW); +eval(cXDHdrXnqo5KwwVpTRuc6OprAW); +cd(OvMuQsJgjwzYG5Pni0TzU8Acb2YBJva); + try data = dseries(eval(cellofstring4eval(varobs)),[],varobs); catch