Throw a warning if a parameter has no value.

fix-tolerance-parameters
Stéphane Adjemian (Charybdis) 2022-04-28 10:04:05 +02:00
parent a600336c92
commit 1d22285043
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 5 additions and 1 deletions

View File

@ -315,7 +315,11 @@ if ~isempty(plist)
for i=1:length(plist)
id = strcmp(plist{i}, M_.param_names);
if any(id)
fprintf(fid, '%s = %s;\n', plist{i}, num2str(M_.params(id), 16));
if isnan(M_.params(id))
warning('Parameter %s has no value.', plist{i})
else
fprintf(fid, '%s = %s;\n', plist{i}, num2str(M_.params(id), 16));
end
end
end
fclose(fid);