if mq==[1 2] subplot(2,1,1) axis([-5 5 -0.1 1.1]) xi = x/max(t,1e-10); htrue = (xi - 2).^2 / 9; htrue(find(xi<-1)) = 1; htrue(find(xi>2)) = 0; hold on plot(x,htrue,'r') legend('computed','true') hold off subplot(2,1,2) axis([-5 5 -.5 .5]) utrue = 2*(1-sqrt(htrue)); hutrue = htrue.*utrue; hold on plot(x,hutrue,'r') legend('computed','true') hold off end