91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-12
  • 語言: Matlab
  • 標(biāo)簽:

資源簡(jiǎn)介

通過離散點(diǎn)擬合出橢圓,得到橢圓參數(shù),并在matlab里直接作圖,直接使用,方便,經(jīng)測(cè)試

資源截圖

代碼片段和文件信息

function?[varargout]=ellipsefit(xy)
%ELLIPSEFIT?Stable?Direct?Least?Squares?Ellipse?Fit?to?Data.
%?[XcYcABPhiP]=ELLIPSEFIT(XY)?finds?the?least?squares?ellipse?that
%?best?fits?the?data?in?X?and?Y.?X?and?Y?must?have?at?least?5?data?points.
%?Xc?and?Yc?are?the?x-?and?y-axis?center?of?the?ellipse?respectively.
%?A?and?B?are?the?major?and?minor?axis?of?the?ellipse?respectively.
%?Phi?is?the?radian?angle?of?the?major?axis?with?respect?to?the?x-axis.
%?P?is?a?vector?containing?the?general?conic?parameters?of?the?ellipse.
%?The?conic?representation?of?the?ellipse?is?given?by:
%
%?P(1)*x^2?+?P(2)*x*y?+?P(3)*y^2?+?P(4)*x?+?P(5)*y?+?P(6)?=?0
%
%?S=ELLIPSEFIT(XY)?returns?the?output?data?in?a?structure?with?field?names
%?equal?to?the?variable?names?given?above?e.g.?S.Xc?S.Yc?S.A?S.B
%?S.Phi?and?S.P
%
%?Reference:?R.?Halif?and?J.?Flusser?“Numerically?Stable?Direct?Least
%?Squares?FItting?of?Ellipses“?Department?of?Software?Engineering?Charles
%?University?Czech?Republic?2000.

%?Conversion?from?conic?to?conventional?ellipse?equation?inspired?by
%?fit_ellipse.m?on?MATLAB?Central

%?D.C.?Hanselman?University?of?Maine?Orono?ME?04469
%?Mastering?MATLAB?7
%?2005-02-28
%?Rotation?angle?fixed?2005-08-09

%--------------------------------------------------------------------------
x=x(:);?%?convert?data?to?column?vectors
y=y(:);
if?numel(x)~=numel(y)?||?numel(x)<5
???error(‘X?and?Y?Must?be?the?Same?Length?and?Contain?at?Least?5?Values.‘)

評(píng)論

共有 條評(píng)論

相關(guān)資源