You can do Time Shifting in Matlab with Discrete as well as Continuous signals. To time shift any discrete or continuous signal in Matlab, simply open and create a new Script (.m file) in Matlab.
Open MATLAB << Then on the top left corner click on the File option << Click New << Then click Script.
Now write the following Matlab code given below of Time Shifting into the new script (.m file) and save the file in the Matlab directory with any name you want.
TIME SHIFTING MATLAB CODE:
t = 1:1.5:20;
x = 2*sin(t);
title(‘Signal Shifted Left’)
title(‘Signal Shifted Right’)
Now Run the code, after you have saved the file.
This is how you can Time Shift a signal in MATLAB. Hope you like this article. If you want to learn more about MATLAB you can read and view all the blog posts related to MALTAB here. MATLAB Learning
If you need any help and assistance, please comment down below so that we can help you. Good Luck!!