How to do a sin wave by altering the phase?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I need to create 5 sin waves that go from -5 to 5 secs. The sampling rate is fixed but I need to change the fruquency, amplitude and phase. Any clue on how to go about it?
My current coding (below) is not working: t = [-5:1:5]; %time from -5 seconds to 5 seconds f = 256 %the Hz A = 1 %amplitude phase = s_1 = A*sin(2*pi*f*t*phase) %sinwave1
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!