Skip to content
Snippets Groups Projects
Commit 21e4f580 authored by leprob001's avatar leprob001
Browse files

Bugfixes and improvements to fit_ellipse.

parent 5a39694b
No related branches found
No related tags found
No related merge requests found
304
\ No newline at end of file
305
\ No newline at end of file
......@@ -144,7 +144,7 @@ plot_values = struct( ...
);
% empty warning stack
warning( '' );
lastwarn( '' );
% prepare vectors, must be column vectors
x = x(:);
......@@ -162,7 +162,7 @@ a = sum(X)/(X'*X);
% check for warnings
if ~isempty( lastwarn )
disp( 'stopped because of a warning regarding matrix inversion' );
disp( [mfilename ': stopped because of a warning regarding matrix inversion.'] );
ellipse_t = [];
return
end
......@@ -195,8 +195,8 @@ end
test = a*c;
switch (1)
case (test>0), status = '';
case (test==0), status = 'Parabola found'; warning( 'fit_ellipse: Did not locate an ellipse' );
case (test<0), status = 'Hyperbola found'; warning( 'fit_ellipse: Did not locate an ellipse' );
case (test==0), status = 'Parabola found'; warning( 'fit_ellipse: Did not locate an ellipse.' );
case (test<0), status = 'Hyperbola found'; warning( 'fit_ellipse: Did not locate an ellipse.' );
end
% if we found an ellipse return it's data
......
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