我的程序:
clear;
m=3.53*10^5;
EI=1.38*10^6;
K=1.7*10^8;
C=10^6;
E=1.5*10^9;
I=9.2*10^(-4);
Cs=6*10^9;
mu=16.67;
P=4.9*10^7;
n=(Cs*I)/(2*m);
e=C/(2*m);
a=2*n*e-EI/m;
b=e^2-K/m;
r1=-a/(2*n^2)-1/n*sqrt((a/(2*n))^2-b);
r2=-a/(2*n^2)+1/n*sqrt((a/(2*n))^2-b);
syms w h x t;
v1=-r2^(1/4);
v2=r2^(1/4);
u=16.67:166.7:1683.67;
v=1:10:101;
for s=1:length(u)
for j=1:length(v);
x=u(s);
t=v(j)
while(1)
n=100;
r=2;
e=1*e^-4;
Q2=vectorize(vpa(exp(-(n*w^4+e)*(t-h))*sinh(sqrt((n*w^4+e)^2-1/m*(EI*w^4+K))*(t-h))*cos(w*(x-mu*h))/sqrt((n*w^4+e)^2-1/m*(EI*w^4+K))));
B0=inf;
B1=dblquad(inline(Q2),0,t,v2,n);
while abs(B0-B1)>e
B0=B1;
n=n*r;
B1=dblquad(inline(Q2),0,t,v2,n);
end
B1
end
B1(s,j)=real(B1(s,j))
end
end
surf(u,v,B1)
hold on
grid on
xlabel('x')
ylabel('t')
zlabel('y')
title('函数图像')
还是不行!!帮忙看一下 |