MATLAB: Two functions superimposed on each other.

plotting

Suppose I have two functions, say y = sin(t) and y = sin( t + pi/4) and I want to make them start at the same point. How can this be done?

Best Answer

t=0:0.1:10
plot(t, sin(t))
hold on ,
plot(t+pi/4,sin( t + pi/4) )