Changeset 85e0208 in orbit for octave/GenerateAudioCommand/halfSineGenDirect.m
 Timestamp:
 12/19/12 09:04:54 (10 years ago)
 Branches:
 master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
 Children:
 d604d68
 Parents:
 42379ae
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

octave/GenerateAudioCommand/halfSineGenDirect.m
rcb3655b r85e0208 1 1 function wave = halfSineGenDirect(dir,halfPeriod_in_samples,zero,amp,sps) 2 2 3 % generate half Sine wave, at a length of certain samples. 4 3 5 % dir: 'u' means UP, 'd' means down. 4 % halfPeriod: half period of sine signal[us]. 5 % zero: zero level of cosine signal. 6 % amp: amplitude of cosine signal, in percentage. 6 % halfPeriodi_in_samples: half period of sine signal[samples]. 7 % zero: zero level of cosine signal. DEPRECATED 8 % amp: amplitude of cosine signal, in percentage.DEPRECATED 9 % sps: sampling rate. 7 10 8 11 halfPeriod=halfPeriod_in_samples/sps; 9 12 10 13 bps = 16; % bits per sample 11 %sps = 960000; % sample rate [samples/s]12 14 period = halfPeriod*2; %period of [s] 13 15 freq = floor(sps/(halfPeriod_in_samples*2)); % frequency of the tone [Hz]
Note: See TracChangeset
for help on using the changeset viewer.