Prev: vector division
Next: HELP!!! lsqnonlin fitting problem
From: satya mishra on 5 May 2010 17:40 I am trying to generate a sine wave whose frequency changes dynamically during simulation. The frequency should come as input to the sinewave block from another block. I would be grateful for any suggestion or help
From: Guy Rouleau on 5 May 2010 18:26 "satya mishra" <dudesatya(a)in.com> wrote in message <hrsok4$lg5$1(a)fred.mathworks.com>... > I am trying to generate a sine wave whose frequency changes dynamically during simulation. The frequency should come as input to the sinewave block from another block. > > I would be grateful for any suggestion or help There is no block shipped with Simulink to directly do that. You need to implement the equation y = sin(w*t + phi) using basic blocks like sum, product and trigo. Guy
From: satya mishra on 5 May 2010 18:36 Well the problem with that kind of implementation is to include simulation time 't'. 'w' can be worked out as 2*pi*dynamic value of 'f'. thanks satya
From: Guy Rouleau on 6 May 2010 07:38 "satya mishra" <dudesatya(a)in.com> wrote in message <hrsrsk$ldb$1(a)fred.mathworks.com>... > Well the problem with that kind of implementation is to include simulation time 't'. 'w' can be worked out as 2*pi*dynamic value of 'f'. > thanks > satya The Clock block (look in the Sources section of the library browser) can provide you the simulation time. http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/clock.html http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/digitalclock.html
|
Pages: 1 Prev: vector division Next: HELP!!! lsqnonlin fitting problem |