조회 수: 1(최근 30일)
Mustafa Alhandhali 2019년 4월 9일
댓글: Mustafa Alhandhali 2019년 4월 9일
format shortG
kxx = 2.0e4; kyy = 8.8e4;
kxy = 1.0e3; kyx = 1.5e3;
cxx = 1.0 ; cyy = 1.0; cxy = 1.0e-1;
cyx = 1.0e-1;
l=2; m=5; id=0.1;
er=0.13-3; ez=1e-3; mu=0.02;
i = sqrt(-1);
syms w
stiffnes_matrix=[kxx kyy 0 0; kyx kyy 0 0; 0 0 0.25*l^2*kxx 0.25*l^2*kxy;0 0 0.25*l^2*kyx 0.25*l^2*kyy];
mass_matrix=[m 0 0 0; 0 m 0 0; 0 0 id 0; 0 0 0 id];
force_unblance=[mu*er*w^2; -i*mu*er*w^2; mu*er*w^2*ez; -i*mu*er*w^2*ez];
D=stiffnes_matrix-(w^2*mass_matrix);
xss=inv(D)*force_unblance
p1=xss(1,1)
p2=xss(2,1)
p3=xss(3,1)
p4=xss(4,1)
set(gca, 'YScale', 'log')
w = linspace(0,1200)';
plot(p1,w)
plot(p2,w)
plot(p3,w)
plot(p4,w)
i want to drwa but this error appear
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.

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

### 채택된 답변

Stephan 2019년 4월 9일
편집: Stephan 2019년 4월 9일
Hi,
try:
format shortG
kxx = 2.0e4; kyy = 8.8e4;
kxy = 1.0e3; kyx = 1.5e3;
cxx = 1.0 ; cyy = 1.0; cxy = 1.0e-1;
cyx = 1.0e-1;
l=2; m=5; id=0.1;
er=0.13-3; ez=1e-3; mu=0.02;
i = sqrt(-1);
syms w
stiffnes_matrix=[kxx kyy 0 0; kyx kyy 0 0; 0 0 0.25*l^2*kxx 0.25*l^2*kxy;0 0 0.25*l^2*kyx 0.25*l^2*kyy];
mass_matrix=[m 0 0 0; 0 m 0 0; 0 0 id 0; 0 0 0 id];
force_unblance=[mu*er*w^2; -i*mu*er*w^2; mu*er*w^2*ez; -i*mu*er*w^2*ez];
D=stiffnes_matrix-(w^2*mass_matrix);
xss=D\force_unblance;
fun_xss = matlabFunction(xss);
clear w
w = linspace(0,1200);
p_all=fun_xss(w);
subplot(2,2,1)
semilogy(w,abs(p_all(1,:)))
subplot(2,2,2)
semilogy(w,abs(p_all(2,:)))
subplot(2,2,3)
semilogy(w,abs(p_all(3,:)))
subplot(2,2,4)
semilogy(w,abs(p_all(4,:)))
results in:
Best regards
Stephan
##### 댓글 수: 3표시숨기기 이전 댓글 수: 2
Mustafa Alhandhali 2019년 4월 9일
thank you so much

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

### Community Treasure Hunt

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

Start Hunting!

Translated by