


下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、優(yōu)化計(jì)算MATLAB程序首先,將目標(biāo)函數(shù)寫成M文件,其程序語句如下;function f = fun (x)global K L thetamax alphafor i=1:61f = 0betae = atan(tan(alpha(i)/(1-(K/L)*tan(alpha(i);A(i)=2*x(1).2*sin(x(2)+alpha(i);B(i)=2*K*x(1)-2*x(1).2*cos(x(2)+alpha(i);C(i)=2*x(1).2-4*x(1).2*(cos(x(2).2+4*K*x(1)*cos(x(2)-2*K*x(1)*cos(x(2)+alpha(i);theta
2、3(i)= 2*acot(A(i)+sqrt(A(i).2+B(i).2-C(i).2)/(B(i)+C(i);beta(i)=x(2)+theta3(i)-pi;if alpha(i)=pi/18,alpha(i)=pi/9;f(i)=abs(betaa(i)-betae3(i);elsef(i)=0.5*abs(beta(i)-betae3(i);global K L thetamax alphaK=inputL=inputthetamax=inputx0(1)=inputx0(2)=inputthetamax = thetamax*pi/180;x0(2)=x0(2)*pi/180;lb
3、(1)=0.17K; lb(2)=0.17*K; ub(1)=acot(K/(1.2*L)ub(2)=pi/2;alpha=linspace (0, theamax ,61);lb=lb(1),lb(2);ub=ub(1),ub(2);x(0)=x0(1),x0(2);options = optimset ( TolFun,le-10,TolCon,le-6)x,resnorm = lsqnonlin(fun,x0,lb,ub,options)g lobal K L thetamax alphaK = inputL= inputthetamax= inputx ( 1) = inputx (
4、2) = inputthetamax = thetamax * pi/ 180;x ( 2) = x ( 2) * pi/ 180;alpha= linspace( 0, thetamax , 61) ;fo r i= 161betae= atan( tan( alpha( i) ) / ( 1- K/ L) * tan( alpha( i) ) ) ) ;A ( i) = 2* ( x ( 1) ) .2* sin ( x ( 2) + alpha( i) ) ;B( i) = 2* K* x( 1) - 2* ( x ( 1) ) . 2* cos( x( 2) + alpha( i) )
5、 ) ;C ( i ) = 2* ( x ( 1) ) . 2- 4 * ( x ( 1) ) . 2*( cos( x( 2) ) ) . 2+ 4* K * x ( 1) * cos( x ( 2) ) - 2* K* x ( 1) * cos( x ( 2) + alpha( i) ) ;theta3(i)= 2* acot ( A( i) + sqr t ( ( ( A( i) ) .2+( B( i) ) . 2- * ( C( i) ) . 2) ) /( B( i) + C( i) ) ) ;beta( i) = x ( 2) + theta3( i) - pi;endplot
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年雙層紙質(zhì)包裝袋項(xiàng)目可行性研究報(bào)告
- 2025至2030年中國晴雨傘數(shù)據(jù)監(jiān)測研究報(bào)告
- 2025至2030年中國數(shù)字化口腔內(nèi)窺鏡數(shù)據(jù)監(jiān)測研究報(bào)告
- 2025年木制支架項(xiàng)目可行性研究報(bào)告
- 2024-2025學(xué)年高中政治6.1人民代表大會:國家權(quán)力機(jī)關(guān)訓(xùn)練含解析新人教版必修2
- 2024-2025學(xué)年高中歷史課下能力提升十三建設(shè)中國特色社會主義理論含解析人民版必修3
- 2025就業(yè)年度工作計(jì)劃(12篇)
- 2025年特色燒烤店承包經(jīng)營合同
- 2025年年智能制造項(xiàng)目發(fā)展計(jì)劃
- 23《梅蘭芳蓄須》教學(xué)設(shè)計(jì)-2024-2025學(xué)年統(tǒng)編版語文四年級上冊
- 生產(chǎn)車間管理制度辦法
- 12j912-2常用設(shè)備用房
- 質(zhì)量獎(jiǎng)與自評報(bào)告
- DTⅡ型固定式帶式輸送機(jī)設(shè)計(jì)選型手冊
- 約束評分標(biāo)準(zhǔn)
- 橡膠壩工程施工質(zhì)量驗(yàn)收評定表及填表說明編制于
- 抗日戰(zhàn)爭勝利題材話劇劇本范文
- GB/T 22328-2008動植物油脂1-單甘酯和游離甘油含量的測定
- 錄用offer模板參考范本
- GB 16780-2021水泥單位產(chǎn)品能源消耗限額
評論
0/150
提交評論