function setConfig(variable, value) currentConfig = getConfig(); currentConfig.(variable) = value; fid = fopen('config.json','w'); fprintf(fid, replace(jsonencode(currentConfig), ",", ",\n")); fclose(fid); end