diff options
author | Norbert Preining <norbert@preining.info> | 2017-10-14 11:43:11 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2017-10-14 11:43:11 +0900 |
commit | dc71274f16f7ff65145e034900f582b62453a033 (patch) | |
tree | a71452364cbe1a03feb6a84cdfd09eedae861590 /texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci | |
parent | aecda53b09be64698e9e5dcbf40f0fe289b37e2e (diff) |
rename and update ketpic -> ketcindy
Diffstat (limited to 'texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci')
-rw-r--r-- | texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci b/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci new file mode 100644 index 00000000..af259244 --- /dev/null +++ b/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Fouriercoeff.sci @@ -0,0 +1,21 @@ +// 09.03.13 + +function Out=Fouriercoeff(Fn,T,Ch,K) + Eps=10^(-5); + L=T/2; + Tmp1='Out=FUNC(x)'; + if Ch=='c' + Tmp2='Out=Fn(10*L*x)*cos('+string(K)+'*%pi*x*10)'; + else + Tmp2='Out=Fn(10*L*x)*sin('+string(K)+'*%pi*x*10)'; + end; + deff(Tmp1,Tmp2); + Out=10*intg(-0.1,0.1,FUNC); + if K==0 + Out=Out/2; + end; + if abs(Out)<Eps + Out=0; + end; +endfunction; + |