please please ...... i need help in this programme is there an error

1 visualización (últimos 30 días)
M=120; EI=20*10^7; ksi=0;%.04; k=0.2*10^8; v=1; n1=5; n=501;
l=(3*pi/2)*(4*EI/k)^0.25; t1=l/v; %%%%%%%%%%%%%%%% Les conditions initiales %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
v_0=0.001; %m/s;vitesse initiale ;T_0=0.0001; %m déplacement initiale; t1=l/v; ww1=0; Q=16*10^4; %N; chargement
for m=1:n1; for i=1:n; xx(i)=l/(n-1); xx1(i)=xx(i)*(i-1);
phi(i,m)=sin(m*pi*(xx1(i))/l);
for j=1:n;
tt(j)=l/v/(n-1);
tt1(j)=tt(j)*(j-1);
w_d(m)=(((((m^4)*(pi^4)*EI)/M/(l^4)))+k/M)^0.5;
%ksi(m)=c/(2*M*w_d);
w_n(m)=w_d(m)*(1-(ksi)^2)^0.5;
B=T_0;
mu(m)=m*pi*v/l;
A1=2*Q/(M*l);
A2(m)=1/(w_n(m)^4+2*(((ksi*w_d(m))^2-w_n(m)^2)*mu(m)^2)+mu(m)^4); %(((w_n(m))^4)+2*((((ksi*w_d)^2)+((w_n(m)^2)))*(mu(m)^2))+mu(m)^4);
A3(m)=2*ksi*w_d(m)*mu(m);
A4(m)=(mu(m)/w_n(m))*(((ksi*w_d(m))^2)-(w_n(m)^2)+mu(m)^2);
A5(m)=((w_n(m))^2-(mu(m)^2));
T11(j,m)=exp(-ksi*w_d(m)*(tt1(j)));
T1(j,m)=A1*A2(m)*(T11(j,m)*(A3(m)*cos(w_n(m)*tt1(j))+A4(m)*sin(w_n(m)*tt1(j)))-A3(m)*cos(mu(m)*tt1(j))+A5(m)*sin(mu(m)*tt1(j)));
ww1(i,j,m)=phi(i,m)*T1(j,m);
end
end
end
for i=1:n; for j=1:n; ww1(i,j)=0; for m=1:n1; ww1(i,j)=ww1(i,j)+ww1(i,j,m);
%ww1(i,j) = sum(ww1(i,j,:));
end
end
end
plot(ww1(:,3),'b');
hold on

Respuesta aceptada

Jason R
Jason R el 19 de Feb. de 2014
What is the problem? I was able to run your code when I uncommented the variables k, v, etc. Remember that anything after a % will not be ran. So in line 5, T_0 is not getting initialized because it is commented out.
  2 comentarios
sihem chaib
sihem chaib el 21 de Feb. de 2014
maybe Like That is clearer
sihem chaib
sihem chaib el 21 de Feb. de 2014
this program does not give the graph I want to have there a mistake somewhere but I could find

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by