hello can you please help me?? when i type this code i only get a balnk plot
i don`t know where is my mistake
the code
sigma0=0;el= 0.5;L= 1 ;h= 0.5 ;a= 1;N= 3;g=10;rho=1000;Z0=0;t=0:0.01:5;x=0:0.02:el;y=0:0.02:L;[X,Y]=meshgrid (x,y);sigma=0;T=3*pi/4;for n=0:N for m=0:N A=pi*((m/el)^(2)+(n/L)^(2))^(0.5); B=(g*A+(sigma/rho)*A^3)*atan(A*h); C=B^(0.5); Z=a*cos(C.*T).*cos((m*pi/el).*X).*cos((n*pi/L).*Y); Zs=Z0+Z; Z0=Zs; endend m=3; n=4; A=pi*((m/el)^(2)+(n/L)^(2))^(0.5);B0=(g*A+(sigma0./rho)*A^3)*atan(A*h);C0=(B0.^(0.5)); Z0=(a.*cos(C0.*T)).*cos((m*pi/el).*X).*(cos((n*pi/L).*Y));figuresubplot(221)plot(t,length(Z0));xlabel(' temps s');ylabel(' élévation z(x,y)y');title(' sans tension superficielle');legend('sigma0')
Best Answer