From 8f47ac1670552cfa8291e81f2a6906284b6d117b Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Wed, 24 Apr 2019 15:18:34 +0200 Subject: [PATCH] remove unused file --- examples/loadInWorkspaceAndM_.m | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 examples/loadInWorkspaceAndM_.m diff --git a/examples/loadInWorkspaceAndM_.m b/examples/loadInWorkspaceAndM_.m deleted file mode 100644 index bd60a4c..0000000 --- a/examples/loadInWorkspaceAndM_.m +++ /dev/null @@ -1,23 +0,0 @@ -function loadInWorkspaceAndM_(filename) - -if ~evalin('base','exist(''M_'',''var'')') ... - || ~evalin('base','isstruct(M_)') ... - || evalin('base','isequal(M_, struct())') - error('Didn''t find M_ in base workspace; you must furst run the .mod file before running this file.') -end - -fid = fopen(filename); -if fid < 0 - error(['Problem encountered opening ' filename]); -end -filevars = textscan(fid,'%s=%*s'); -fclose(fid); - -evalin('base', filename); -for i=1:length(filevars) - M_idx = find(not(cellfun('isempty', evalin('base', ['strfind(M_.param_names, ' filevars(i) ');']))); - if ~isempty(M_idx) - evalin('base', ['M_.params(' M_idx ') = ' filevars(i) ';']); - end -end -end -- GitLab