필터 지우기
필터 지우기

ode23 , matrix equation , 2nd order DE

조회 수: 1 (최근 30일)
Gloria
Gloria 2019년 6월 14일
댓글: darova 2019년 6월 19일
How I will solve this matrix in Matlab ?
w=10.02;
p= 7850; %%%Kg/m^3;
g=9.81;
G=77*10^9; %%% N/m^2
E=206*10^9; %%% N/m^2
L=9.6; %%%m
D=0.15 ; %%m
m=pi*(D/2)^2*L*p;
A=pi*D^2/4 ; %%m2
J=m*D^2/8; %%Kg*m^2
Ip=pi*D^4/32 ; %% m^4
I=pi*D^4/64 ;
cx=0.05*m*w;
cy=0.05*m*w;
ct=0.08*J*w;
kx=3*E*I/L;
ky=3*E*I/L;
kt=G*Ip/L;

채택된 답변

darova
darova 2019년 6월 14일
You can find roots for x'', y'' and dtheta'' every iteration solving matrix equation
function du = func(t,u)
u1 = u(1:3)'; % [x y theta]'
du1 = u(4:6)'; % [dx dy dtheta]'
dth = u(6); % dtheta
C = [cx 0 0; 0 cy 0; 0 0 cz]; % C matrix
K = ... % K matrix
F = [me(w+dth)^2+Fx; ...] % force vector
A = [m 0 -mesin(wt)...] % mass matrix
B = -C*du1 -K*u1 + F;
du = zeros(6,1);
du(1:3) = u(4:6);
du(4:6) = A\B;
end
  댓글 수: 7
Gloria
Gloria 2019년 6월 19일
Error using ode45
Too many input arguments.
Error in Untitled2 (line 10)
[t,u] = ode45(@dokuz,tspan,IC);
BUT WITH ODE23 IT GIVES THE ANSWERS, THANK YOU SO MUCH
darova
darova 2019년 6월 19일
Can you accept the answer please?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Torsten
Torsten 2019년 6월 14일
Convert the system to a first order system and write it as
M*y' = f(t,y)
Then use the mass-matrix option of the ODE solvers to supply M, define f in a function file and use ODE45, ODE15S, ... to solve.
  댓글 수: 6
Gloria
Gloria 2019년 6월 16일
But I got the figures;
sdot=@(t,s)...
[s(2);
(m*e*sin(w*t)*s(6)'-cx*s(2)-kx*s(1)+m*e*(w+s(6))^2*cos(w*t)+Fx(t))/m;
s(4);
(-m*e*cos(w*t)*s(6)'-cy*s(4)-ky*s(3)-m*g+m*e*(w+s(6))^2*sin(w*t)+Fy(t))/m;
s(6);
(m*e*sin(w*t)*s(2)'-m*e*cos(w*t)*s(4)'-ct*s(6)-kt*s(5)-m*e*g*cos(w*t)+Mt(t))/(J+m*e^2)];
So Can I write s(6)',s(2)'s(4)' or not?
Jan
Jan 2019년 6월 16일
You can write s(6)', because ' is the Matlab operator for the complex conjugate transposition:
a = [1, 1i; ...
2, 2i]
a'
You provide real scalars. Then the ' operaotr does not change the value. So it is valid, but simply a confusing waste of time.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by