For my assignment I have to plot a graph for a sine wave the question is as follows, "t is 0 and 2π radians. y=5sin(2t+pi/6)" Now I input this in to matlab what i have got so far is; A = amplitude , F = frequency , P = phase , T = time A= 5 F=2 P= pi/6 T = 0:0.1"2*pi Y= A*sin(F*T+P) Then I plotted (T,Y) Can you confirm if i have done this in the correct way, if so I now need to smooth the wave is this possible in matlab if yes how do i do this? (I have attached the graphs, I have zoomed one to display )

 Réponse acceptée

KSSV
KSSV le 8 Oct 2016
Modifié(e) : KSSV le 8 Oct 2016
You need not to smooth it. Take time step small in T. Like:
T = 0:0.01:2*pi;
Play with the time step. Also you can use linspace. Doc linspace.

Plus de réponses (0)

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by