Skip to content

Commit

Permalink
Fix bug in marginalizing data with no conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Munsky committed Jul 23, 2024
1 parent 624e90f commit 0866f79
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/CommandLine/SSIT.m
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,8 @@ function sampleDataFromFSP(obj,fspSoln,saveFile)
tmp = solutions.ode(IA,J);
vm(:) = tmp(:);

vd = zeros(nt*nds,1); vd(:) = obj.dataSet.mean(:);
vd = zeros(nt*nds,1);
vd(:) = obj.dataSet.mean(:);

vm = real(vm);

Expand Down
12 changes: 10 additions & 2 deletions src/gui/data_loading/filterAndMarginalize.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@
% not yet for more complicated conditions -- will require future testing.

% this part determines which variables are conditioned over
histDataStr = cellfun(@num2str,histDataRaw,'UniformOutput',false); % convert double in cell to str
loopCond = [app.DataLoadingAndFittingTabOutputs.conditionOnArray{:,1}];
try
histDataStr = cellfun(@num2str,histDataRaw,'UniformOutput',false);
catch
end
% convert double in cell to str
if ~isempty(app.DataLoadingAndFittingTabOutputs.conditionOnArray)
loopCond = [app.DataLoadingAndFittingTabOutputs.conditionOnArray{:,1}];
else
loopCond=[];
end

if ~isempty(loopCond)
for iC = 1:length(loopCond)
Expand Down

0 comments on commit 0866f79

Please sign in to comment.