資源簡介
ellipsefit為橢圓擬合程序。ellipse1為示例。只要輸入點的坐標(無論多少點),此程序就可算出擬合的橢圓方程
代碼片段和文件信息
x=[2762275427452735272327102695267926612643
????2623260225802557253225072481245424252396
????2367233623052237224022072173213821032068
????2032199519591921188418461807176917301691
????1652161315731534149414541415137513361296
????1256121711781139110010611023985947910
????873836800764729694660626593561
????529499468439410383356330305281
????259237216197179162146132119107
????97898276727069707377
????8492102113127143160179201224
????249276304335367401438475514555
????5986426877347828328829339861039
????1093114812031259131513711427148415401596
????1652170717611815186819211972202220722120
????2166221222552297233923782415245024842516
????2547257526022626264926702689270627222735
????2746275627642770277427762777277627732769];
y=[1792178617811775176917641758175317471742
????1737173217271722171717131708170417001696
????1692168816841681167716741671166816651663
????1660165816551653165116501648164616451644
????1643164216411640164016401639163916401640
????1640164116411642164316441646164716491651
????1652165416571659166116641667167016731676
????1679168316861690169416981702170617111715
????1720172517301735174017451750175617611767
????1773177817841790179618021808181418211827
????1833183918451852185818641870187718831889
????1895190019061912191719231928193319381942
????1947195119551959196319661970197219751977
????1979198119831984198519851986198619851985
????1984198319811980197819751973197019671963
????1960195619521948194319381934192919231918
????1913190719011896189018841878187218661859
????1853184718411835182818221816181018041798];
[varargout]=ellipsefit(xy)
figure(3)
plot(xy‘o‘)?
alpha=0:pi/200:2*pi;%角度[02*pi]
a=1.3534e+003*cos(alpha)+1.4224e+003;
b=173.1397*sin(alpha)+1.8126e+003;
plot(xy‘or‘ab‘-‘)
grid?on?
??
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1542??2009-08-08?19:08??ellipsefit.m
?????文件???????2136??2010-01-06?00:55??ellipse1.m
-----------?---------??----------?-----??----
?????????????????3678????????????????????2
- 上一篇:算術編碼解碼matlab源代碼
- 下一篇:基于matlab的圖像處理源程序
評論
共有 條評論