tv = -25:0.01:25;
T = 25;  w0 = 2*pi/T;
x1 = 1/pi*cos(w0*tv);
x3 = 1/(3*pi)*cos(3*w0*tv + pi);
x5 = 1/(5*pi)*cos(5*w0*tv);

fh = figure;  lhv = [];
subplot(4,1,1);  plot(tv,x1+x3+x5,'r');  
ax = axis;  lh = line([0;0], ax(3:4)');  lhv = [lhv lh];
title('Original signal and components');
subplot(4,1,2);  plot(tv,x1);  
ax = axis;  lh = line([0;0], ax(3:4)');  lhv = [lhv lh];
subplot(4,1,3);  plot(tv,x3);  
ax = axis;  lh = line([0;0], ax(3:4)');  lhv = [lhv lh];
subplot(4,1,4);  plot(tv,x5);  
ax = axis;  lh = line([0;0], ax(3:4)');  lhv = [lhv lh];
set(lhv,'Color','k');

T = 25;  w0 = 2*pi/T;
k = -5;
x1 = 1/pi*cos(w0*tv + k*w0);
x3 = 1/(3*pi)*cos(3*w0*tv + pi + k*3*w0);
x5 = 1/(5*pi)*cos(5*w0*tv + k*5*w0);

fh = figure;  lhv1 = [];  lhv2 = [];
subplot(4,1,1);  plot(tv,x1+x3+x5,'r');
ax = axis;  lh = line([0;0], ax(3:4)');  lhv1 = [lhv1 lh];
ax = axis;  lh = line([-k;-k], ax(3:4)');  lhv2 = [lhv2 lh];
title('Linear phase transformation');
subplot(4,1,2);  plot(tv,x1);
ax = axis;  lh = line([0;0], ax(3:4)');  lhv1 = [lhv1 lh];
ax = axis;  lh = line([-k;-k], ax(3:4)');  lhv2 = [lhv2 lh];
subplot(4,1,3);  plot(tv,x3);
ax = axis;  lh = line([0;0], ax(3:4)');  lhv1 = [lhv1 lh];
ax = axis;  lh = line([-k;-k], ax(3:4)');  lhv2 = [lhv2 lh];
subplot(4,1,4);  plot(tv,x5);
ax = axis;  lh = line([0;0], ax(3:4)');  lhv1 = [lhv1 lh];
ax = axis;  lh = line([-k;-k], ax(3:4)');  lhv2 = [lhv2 lh];
set(lhv1,'Color','k');  set(lhv1,'LineStyle','--');
set(lhv2,'Color','k');

T = 25;  w0 = 2*pi/T;
x1 = 1/pi*cos(w0*tv + log(w0));
x3 = 1/(3*pi)*cos(3*w0*tv + pi + log(3*w0));
x5 = 1/(5*pi)*cos(5*w0*tv + log(5*w0));

fh = figure;
subplot(4,1,1);
plot(tv,x1+x3+x5,'r');
title('Nonlinear phase transformation');
subplot(4,1,2);
plot(tv,x1);
subplot(4,1,3);
plot(tv,x3);
subplot(4,1,4);
plot(tv,x5);

