clc;clear allsyms x y1 y2 y1=x^2; y2=sin(x); hold on N=200; x=linspace(0,4,N);y01=eval(y1);y02=eval(y2); plot(x(1:N/2),y01(1:N/2)) plot(x(N/2:N),y02(N/2:N)) grid on
以下为图片: