|
103 | 103 | % Remove defaults |
104 | 104 | project.removeBackgroundParam(1); |
105 | 105 | project.removeBackground(1); |
| 106 | +project.removeResolutionParam(1); |
| 107 | +project.removeResolution(1); |
106 | 108 | project.removeBulkIn(1); |
107 | 109 | project.removeBulkOut(1); |
108 | 110 | project.removeScalefactor(1); |
|
124 | 126 | backParamNames{i}); |
125 | 127 | end |
126 | 128 |
|
| 129 | +% Set resolutions |
| 130 | +resolParamNames = num2cell(arrayfun(@(i) sprintf("Resolution par %d", i), 1:problem.numberOfResolutions)); |
| 131 | +problem.resolution_constr = fixConstrs(problem.numberOfResolutions, resolParamNames, problem.resolution_constr, problem.resolution, problem.resolution_fityesno); |
| 132 | +for i = 1:problem.numberOfResolutions |
| 133 | + % Add resolutions parameter |
| 134 | + % addResolutionParam <- (name, min, value, max, fit) |
| 135 | + project.addResolutionParam(resolParamNames{i}, ... |
| 136 | + problem.resolution_constr(i,1), ... |
| 137 | + problem.resolution(i), ... |
| 138 | + problem.resolution_constr(i,2), ... |
| 139 | + logical(problem.resolution_fityesno(i))); |
| 140 | + % Add resolution |
| 141 | + project.addResolution(problem.resolNames{i}, ... |
| 142 | + allowedTypes.Constant.value, ... |
| 143 | + resolParamNames{i}); |
| 144 | +end |
| 145 | + |
127 | 146 | % Set bulk in params |
128 | 147 | problem.nbairs_constr = fixConstrs(problem.numberOfNbas, problem.nbaNames, problem.nbairs_constr, problem.nba, problem.nbairs_fityesno); |
129 | 148 | for i = 1:problem.numberOfNbas |
|
0 commit comments