The code I have in this question I just modified it to generate a non-stationary signals as mentioned below. I just want to know is it the correct way to generate a non-stationary signals?
Code
%% Time specifications:
Fs = 8000; % samples per second
dt = 1/Fs; % seconds per sample
StopTime = 1; % seconds
t = (0:dt:StopTime-dt); % seconds
x = (10)*cos(2*pi*3*(t-.2))...
+ (20)*cos(2*pi*6*(t-.7))...
+ (20)*cos(2*pi*2*(t-.5));