diff --git a/examples/loadInWorkspaceAndM_.m b/examples/loadInWorkspaceAndM_.m deleted file mode 100644 index bd60a4c8707effcc325ec99b547da8fcd9615460..0000000000000000000000000000000000000000 --- 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