Subsections
Sin generator
Sources
This block is a sine wave generator:
Set Gen_SIN Block |
|
Magnitude |
1 |
Frequency |
1 |
phase |
0 |
- Magnitude: a scalar. The magnitude M.
- Frequency: a scalar. The frequency F.
- phase: a scalar. The phase P.
- always active: yes
- direct-feedthrough: no
- zero-crossing: no
- mode: no
- number/sizes of inputs: 0 /
- number/sizes of outputs: 1 / 1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of computational function: gensin
scilab/macros/scicos_blocks/sources/GENSIN_f.sci
subroutine gensin(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
& rpar,nrpar,ipar,nipar,u,nu,y,ny)
c Copyright INRIA
c Scicos block simulator
c Sine genrator
c ampl=rpar(1)
c freq=rpar(2)
c phase=rpar(3)
c
c
double precision t,xd(*),x(*),z(*),tvec(*),rpar(*),u(*),y(*)
integer flag,nevprt,nx,nz,ntvec,nrpar,ipar(*)
integer nipar,nu,ny
c
c
y(1)=rpar(1)*sin(rpar(2)*t+rpar(3))
end
Ramine Nikoukhah
2004-06-22