| 2 | 1/1 | 返回列表 |
| 查看: 398 | 回復: 1 | |||
[求助]
matlab 編程問題
|
|
這是一個畫全維觀測器的程序,function dx=ax3(t,x) dx=[x(2) -48.6*x(1)-1.26*x(2)+48.6*x(3)+21.6*sin(x(2)) 10*x(4) 1.95*x(1)-1.95*x(3)-0.333*sin(x(1)) x(6)+5.1734*(x(1)-x(5))-5.0069*(x(2)-x(6)) -48.6*x(5)-1.26*x(6)+48.6*x(7)+21.6*sin(x(6))-4.3407*(x(1)-x(5)) -4.1015*(x(2)-x(6)) 10*x(8) 1.95*x(5)-1.95*x(7)-0.333*sin(x(5))+1.0759*(x(1)-x(5))+1.0166*(x(2)-x(6))] tspan=[0 10]; x0=[1 2 1 0 1 2 0 0.5]'; [t,x]=ode15s(@ax3,tspan,x0); e1=x(:,1)-x(:,5); e2=x(:,2)-x(:,6); e3=x(:,3)-x(:,7); e4=x(:,4)-x(:,8); plot(t,x(:,1),'r*',t,x(:,5),'o') xlabel('t') legend('狀態(tài)量x_{1}','狀態(tài)量x_{1}的估計') figure plot(t,e1) xlabel('t'); ylabel('狀態(tài)量x_{1}與其估計量的誤差e_{1}') figure plot(t,x(:,2),'r*',t,x(:,6),'o') xlabel('t') legend('狀態(tài)量x_{2}','狀態(tài)量x_{2}的估計') figure plot(t,e2) xlabel('t') ylabel('狀態(tài)量x_{2}與其估計量的誤差e_{2}') figure plot(t,x(:,3),'r*',t,x(:,7),'o') xlabel('t') legend('狀態(tài)量x_{3}','狀態(tài)量x_{3}的估計') figure plot(t,e3) xlabel('t'); ylabel('狀態(tài)量x_{3}與其估計量的誤差e_{3}') figure plot(t,x(:,4),'r*',t,x(:,8),'o') xlabel('t') legend('狀態(tài)量x_{4}','狀態(tài)量x_{4}的估計') figure plot(t,e4) xlabel('t'); ylabel('狀態(tài)量x_{4}與其估計量的誤差e_{4}') 錯誤提示為 http://e.hiphotos.baidu.com/zhid ... 3934522de.jpg 應該怎么改。?? |
專家顧問 (職業(yè)作家)
![]() |
專家經(jīng)驗: +3 |
| 2 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 318一志愿吉林大學生物與醫(yī)藥 求調(diào)劑 +5 | 篤行致遠. 2026-03-28 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 求調(diào)劑 +6 | 家佳佳佳佳佳 2026-03-29 | 6/300 |
|
|
[考研] 一志愿河北工業(yè)大學0817化工278分求調(diào)劑 +10 | jhybd 2026-03-23 | 15/750 |
|
|
[考研] 275求調(diào)劑 +15 | Micky11223 2026-03-25 | 20/1000 |
|
|
[考研] 296求調(diào)劑 +6 | 彼岸t 2026-03-29 | 6/300 |
|
|
[考研] 考研調(diào)劑 +7 | 小蠟新筆 2026-03-29 | 7/350 |
|
|
[考研] 一志愿鄭州大學,080500學碩,總分317分求調(diào)劑 +8 | 舉個栗子oi 2026-03-24 | 9/450 |
|
|
[考研] 086000生物與醫(yī)藥調(diào)劑 +5 | Feisty。 2026-03-28 | 9/450 |
|
|
[考研] 085600,專業(yè)課化工原理,321分求調(diào)劑 +5 | 大饞小子 2026-03-28 | 5/250 |
|
|
[考研] 304求調(diào)劑 +6 | 曼殊2266 2026-03-27 | 6/300 |
|
|
[考研] 085701環(huán)境工程,267求調(diào)劑 +16 | minht 2026-03-26 | 16/800 |
|
|
[考研] 一志愿南京航空航天大學材料學碩求調(diào)劑 +3 | @taotao 2026-03-28 | 3/150 |
|
|
[考研] 315分求調(diào)劑 +7 | 26考研上岸版26 2026-03-26 | 7/350 |
|
|
[考研] 070300化學求調(diào)劑 +4 | 起個名咋這么難 2026-03-27 | 4/200 |
|
|
[考研] 287求調(diào)劑 +10 | land xuxu 2026-03-26 | 10/500 |
|
|
[考研] 08開頭275求調(diào)劑 +4 | 拉誰不重要 2026-03-26 | 4/200 |
|
|
[考研] 276求調(diào)劑。有半年電池和半年高分子實習經(jīng)歷 +10 | 材料學257求調(diào)劑 2026-03-23 | 11/550 |
|
|
[考研] 調(diào)劑求收留 +7 | 果然有我 2026-03-26 | 7/350 |
|
|
[考研] 一志愿北化315 求調(diào)劑 +3 | akrrain 2026-03-24 | 3/150 |
|
|
[考研]
|
黃粱一夢千年 2026-03-24 | 3/150 |
|