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)-
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/11 11:52:16
![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)-](/uploads/image/z/1582121-65-1.jpg?t=matlab+%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E7%94%BB%E5%85%A8%E7%BB%B4%E8%A7%82%E6%B5%8B%E5%99%A8%E7%9A%84%E7%A8%8B%E5%BA%8F%2C%E9%94%99%E8%AF%AF%E6%8F%90%E7%A4%BA%E4%B8%BA+%E5%BA%94%E8%AF%A5%E6%80%8E%E4%B9%88%E6%94%B9%E5%95%8A%3Ffunction+dx%3Dax3%28t%2Cx%29dx%3D%5Bx%282%29++++-48.6%2Ax%281%29-1.26%2Ax%282%29%2B48.6%2Ax%283%29%2B21.6%2Asin%28x%282%29%29++++10%2Ax%284%29++++1.95%2Ax%281%29-1.95%2Ax%283%29-0.333%2Asin%28x%281%29%29++++x%286%29%2B5.1734%2A%28x%281%29-x%285%29%29-5.0069%2A%28x%282%29-)
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)-
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('状态量x_{1}','状态量x_{1}的估计')
figure
plot(t,e1)
xlabel('t');
ylabel('状态量x_{1}与其估计量的误差e_{1}')
figure
plot(t,x(:,2),'r*',t,x(:,6),'o')
xlabel('t')
legend('状态量x_{2}','状态量x_{2}的估计')
figure
plot(t,e2)
xlabel('t')
ylabel('状态量x_{2}与其估计量的误差e_{2}')
figure
plot(t,x(:,3),'r*',t,x(:,7),'o')
xlabel('t')
legend('状态量x_{3}','状态量x_{3}的估计')
figure
plot(t,e3)
xlabel('t');
ylabel('状态量x_{3}与其估计量的误差e_{3}')
figure
plot(t,x(:,4),'r*',t,x(:,8),'o')
xlabel('t')
legend('状态量x_{4}','状态量x_{4}的估计')
figure
plot(t,e4)
xlabel('t');
ylabel('状态量x_{4}与其估计量的误差e_{4}')
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)-
函数在此处定义无效;
注意不要直接再命令窗口中定义函数,要写成m文件.