Skip to content
Snippets Groups Projects
Commit 5a39694b authored by leprob001's avatar leprob001
Browse files

Bugfix, initialization of fit_ellipse return value was not present.

parent bbbb25d6
No related branches found
No related tags found
No related merge requests found
303 304
\ No newline at end of file \ No newline at end of file
...@@ -29,7 +29,7 @@ for i = 1:length(dates) ...@@ -29,7 +29,7 @@ for i = 1:length(dates)
currentResults = pVariationResults{i}; currentResults = pVariationResults{i};
% find ellipse by fit_ellipse function % find ellipse by fit_ellipse function
[~, plot_values] = fit_ellipse(currentResults.observations(:, 2), currentResults.observations(:, 1)); [~, plot_values] = fit_ellipse(currentResults.observations(:, 2), currentResults.observations(:, 1));
if isempty(plot_values) if isempty(plot_values) | all(structfun(@(x) isempty(x), plot_values))
continue; continue;
end end
......
...@@ -136,7 +136,12 @@ function [ellipse_t, plot_values] = fit_ellipse( x,y ) ...@@ -136,7 +136,12 @@ function [ellipse_t, plot_values] = fit_ellipse( x,y )
% initialize % initialize
orientation_tolerance = 1e-3; orientation_tolerance = 1e-3;
plot_values = struct(); plot_values = struct( ...
'new_ver_line', [], ...
'new_horz_line', [], ...
'R', [], ...
'rotated_ellipse', [] ...
);
% empty warning stack % empty warning stack
warning( '' ); warning( '' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment