|
matlab程序问题???求救
%function [dx,dy]=sdzz1(t,x,y)
clear all;close all;
t=0:20;
x=[0,0,0,0,0,0];
y=[0,0,0,0,0,0,0,0];
dx=zeros(6,1)
dy=zeros(8,1)
%参数设置
m1=4
m2=32.1
m3=50
R=25
L=12
c=0.11
miu=0.018
c1=1050
c2=2100
omiga=50 %?
k=2.5*10^7
ks=1000 %??
ks1=7.5*10^7
ks2=2.5*10^9
cs=20 %????
cs1=350
cs2=500
b=0.02 %??
tau=omiga*t
P=m2/2
delta=((miu*omiga*R*L)/P)*(R/c)^2*((L/2*R)^2)
pi=3.14159
%无量纲化
epus1=c1/(m1*omiga)
epus3=c1/(m1*omiga)
epus2=c2/(m2*omiga)
epus4=cs/(m3*omiga)
eta1=k/(m1*omiga^2)
eta3=k/(m1*omiga^2)
eta2=k/(m2*omiga^2)
eta4=ks/(m3*omiga^2)
M1=(m1*c*omiga^2)/(delta*P)
M3=(m1*c*omiga^2)/(delta*P)
M4=(m3*c*omiga^2)/(delta*P)
g=9.8;
G=g/(omiga^2)
%微分方程组程序
dx(1)=x(4)
dx(2)=x(5)
dx(3)=x(6)
dy(1)=y(5)
dy(2)=y(6)
dy(3)=y(7)
dy(4)=y(8)
%油膜力x,y方向的分量表达式
[fx1,fy1]=youmoli(x(1),y(1),dx(1),dy(1))
[fx2,fy2]=youmoli(x(3),y(3)-y(4),dx(3),dy(3)-dy(4))
%继续
dx(4)=-epus1*x(4)-eta1*(x(1)-x(2))+1/M1*fx1
dy(5)=-epus1*y(5)-eta1*(y(1)-y(2))+1/M1*fy1
dx(5)=-epus2*x(5)-eta2*(2*x(2)-x(1)-x(3))+b*cos(omiga*t)
dy(6)=-epus2*y(6)-eta2*(y(2)-y(1)-y(3))+b*sin(omiga*t)-G
dx(6)=-epus3*x(6)-eta3*(x(3)-x(2))+1/M3*fx2
dy(7)=-epus3*y(7)-eta3*(y(3)-y(2))+1/M3*fy2-G
dy(8)=-epus4*y(8)-eta4*y(4)-1/M4*fy2-G
运行后老是显示:
??? In an assignment A(I) = B, the number of elements in B and
I must be the same.
Error in ==> sdzz1 at 60
dx(5)=-epus2*x(5)-eta2*(2*x(2)-x(1)-x(3))+b*cos(omiga*t)
请高手们帮我指点下迷津好不??谢谢谢谢!!!!! |
|