What should I do to not show the legend for all the plots?
问题 Here is my code: N=100; n=50; tau=0.001; h=0.01; lambda=tau/h; mu=lambda/2; u=zeros(N,n); u1=zeros(N,n); u2=zeros(N,n); phi=zeros(n,1); for i=1:n for j=1:N u(j,i)=cos(2*pi*i*(j-1)*h); u1(j,i)=cos(2*pi*i*((j-1)*h-tau)); end for j=2:N u2(j,i)=u(j,i)-lambda*(u(j,i)-u(j-1,i)); end u2(1)=0; phi(i,1)=2*pi*i/N; end uf=zeros(n,1); uf1=zeros(n,1); uf2=zeros(n,1); for i=1:n for j=1:N uf(i,1)=uf(i,1)+(u(j,i)*exp(-1i*(j-1)*phi(i,1)))/100; uf1(i,1)=uf1(i,1)+u1(j,i)*exp(-1i*j*phi(i,1))/100; uf2(i,1)=uf2(i