creating sine wave with variable amp and freq using matlab function block goes wrong !!

2 views (last 30 days)
i'm trying to create sine wave with variable freq and amp decaying with time but every thing goes wrong in the middle as u can see and i can't figure it out till now can any one help me with this problem !? thanks in advanceis
my code is
function [Va,Vb,Vc,] = BACK_EMF_ph(clk,f,amp)
Va=amp*(sin(f*2*pi*clk));
Vb=amp*(sin((f*2*pi*clk)-((2*pi)/3)));
Vc=amp*(sin((f*2*pi*clk)+((2*pi)/3)));
  5 Comments
mostafa amr
mostafa amr on 25 Jan 2020
f is the frequency and it is decaying and clk is the clock to get the real time of the simulation
1.PNG

Sign in to comment.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!