2009/12/29

在visual studio 2005 的CLR WindowsForm 中使用 Matlab engine 的環境設定方法

專案/屬性/一般/Common Language Runtime 支援
= Common Language Runtime 支援 (/clr)

專案/屬性/C/C++/一般/其他include目錄
= C:\MATLAB7\extern\include

專案/屬性/連結器/一般/其他程式庫目錄
= C:\MATLAB7\extern\lib\win32\microsoft\msvc71

專案/屬性/連結器/輸入/其他相依性
= libeng.lib

可能會遇到native與managed c++轉換的問題的解決方法

2009/12/17

fit Ellipse

1-4*sin(theta)^3*Sy^3*y^3*Tx+4*cos(theta)*Sx*x*Tx*Ty^2+sin(theta)^4*Sx^4*x^4+8*cos(theta)^2*Sx*x*Tx*Sy*y*Ty+4*cos(theta)^3*Sx*x*Tx*Sy^2*y^2+6*sin(theta)^2*Sy^2*y^2*Tx^2+cos(theta)^4*Sx^4*x^4+8*cos(theta)*Sx^2*x^2*Tx*sin(theta)*Ty+2*sin(theta)^2*Sy^2*y^2*Ty^2-2*sin(theta)^2*Sx^2*x^2-2*cos(theta)^2*Sx^2*x^2+4*cos(theta)*Sx^3*x^3*Tx*sin(theta)^2-8*cos(theta)*Sx*x*Tx^2*sin(theta)*Sy*y+4*cos(theta)*Sx*x*Tx*sin(theta)^2*Sy^2*y^2+4*cos(theta)^3*Sx^2*x^2*Sy*y*Ty+2*cos(theta)^2*Sx^2*x^2*Ty^2-8*sin(theta)^2*Sy*y*Tx*Sx*x*Ty-4*sin(theta)^3*Sy*y*Tx*Sx^2*x^2+2*Tx^2*Ty^2+4*sin(theta)^2*Sy^3*y^3*cos(theta)*Ty+Tx^4+4*sin(theta)^3*Sy^2*y^2*Sx*x*Ty+2*sin(theta)^2*Sy^4*y^4*cos(theta)^2+2*sin(theta)^4*Sy^2*y^2*Sx^2*x^2+sin(theta)^4*Sy^4*y^4+4*sin(theta)^2*Sx^2*x^2*cos(theta)*Sy*y*Ty+6*sin(theta)^2*Sx^2*x^2*Ty^2+2*sin(theta)^2*Sx^2*x^2*Tx^2-4*sin(theta)*Sy*y*Tx*Ty^2-8*sin(theta)*Sy^2*y^2*Tx*cos(theta)*Ty-4*sin(theta)*Sy^3*y^3*Tx*cos(theta)^2+cos(theta)^4*Sy^4*y^4+4*cos(theta)^3*Sy^3*y^3*Ty+8*sin(theta)*Sx*x*Ty^2*cos(theta)*Sy*y+4*sin(theta)*Sx*x*Ty*cos(theta)^2*Sy^2*y^2+4*sin(theta)*Sx*x*Ty*Tx^2+4*cos(theta)*Sy*y*Ty*Tx^2+Ty^4+4*sin(theta)*Sy*y*Tx-4*cos(theta)*Sy*y*Ty-4*sin(theta)*Sx*x*Ty+6*cos(theta)^2*Sx^2*x^2*Tx^2+4*cos(theta)^3*Sx^3*x^3*Tx-2*sin(theta)^2*Sy^2*y^2-2*Tx^2-4*cos(theta)^2*Sx^2*x^2*sin(theta)*Sy*y*Tx-2*Ty^2+4*cos(theta)^2*Sx^2*x^2*sin(theta)^2*Sy^2*y^2-2*cos(theta)^2*Sy^2*y^2+2*cos(theta)^2*Sx^4*x^4*sin(theta)^2+4*cos(theta)^2*Sx^3*x^3*sin(theta)*Ty+4*cos(theta)*Sx*x*Tx^3-4*sin(theta)*Sy*y*Tx^3+4*sin(theta)^3*Sx^3*x^3*Ty+2*cos(theta)^4*Sx^2*x^2*Sy^2*y^2-4*cos(theta)*Sx*x*Tx+4*sin(theta)*Sx*x*Ty^3+2*cos(theta)^2*Sy^2*y^2*Tx^2+6*cos(theta)^2*Sy^2*y^2*Ty^2+4*cos(theta)*Sy*y*Ty^3