Mercurial > hg > ishara
view dsp/synth/expsin.m @ 36:9e7be347b3a0
Renamed sequence classes to avoid clashes with seq methods;
Fixed default slicing dimension while retaining behaviour of window.m;
Updated use of sequences in dsp/synth.
author | samer |
---|---|
date | Thu, 24 Jan 2013 14:51:23 +0000 |
parents | c75bb62b90a9 |
children |
line wrap: on
line source
function x=expsin(n,k,l,phi) % expsin - return real part of complex exponential. % % expsin :: % N:natural ~'length of signal to return', % real ~'normalised frequency 1=sample rate', % real ~'decay rate, 1/time constant' % -> [[N]]. % % expsin :: % N:natural ~'length of signal to return', % real ~'normalised frequency 1=sample rate', % real ~'decay rate, 1/time constant' % real ~'initial phase' % -> [[N]]. % % If initial phase not given, defaults to -pi/2 (so initial % value is zero with +ve slope). if nargin<4, phi=pi/2; end t=0:n-1; x=real(exp((2*pi*k*i-l)*t-phi*i));