How to do a sin wave by altering the phase?

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.

Tags

Asked:

on 15 Jan 2017

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!