Digital signal processing of sound, video or other single or multidimensional data

learn more… | top users | synonyms

31
votes
3answers
3k views

Implementing continuous phase/Arg function

In MATLAB there's a function called phase that is just like our Listable friend Arg, but ...
28
votes
4answers
1k views

Filtering beat-to-beat heart rate data

From an experiment, I have a dataset of beat-to-beat heart rate data: a list of the time between each heart beat in [ms]. The data is measured using an infrared optic sensor at the finger tip. The ...
26
votes
7answers
1k views

Graphical representation of a moving sound source

Some explanation since I have got a specific and another more open-ended question: I used two microphones in a 90° arrangement (see picture below) to capture sound from a source moving around the room ...
26
votes
4answers
5k views

Computing and plotting a spectrogram in Mathematica

How can I compute and plot the spectrogram of a signal/time series/data in Mathematica? I have a WAV file, sampled at 44100 samples/second and I want to generate a spectrogram of that data. Something ...
22
votes
5answers
11k views

How to find the phase difference of two sampled sine waves?

I'm trying to measure a phase difference between two Sine functions I've acquired with a computer. I'm uploading one of the .txt files with the data I'm working with here: txt file. To remove the ...
20
votes
3answers
3k views

Can one find the beat of a tune with Fourier analysis?

I'm trying to find out if it's possible to find the beat of a tune by Fourier analysis with Mathematica. I'm taking a 44.1 kHz sample sound and hoping that I might get a nice peak for a frequency ...
19
votes
3answers
7k views

Implementing discrete and continuous Hilbert transforms

What is an efficient and accurate Mathematica implementation of the Hilbert transform, for both continuous and especially discretely sampled functions? This transform relates phase and amplitude in ...
19
votes
3answers
2k views

Savitzky-Golay Filter to smooth noisy data

I do have noisy data and want to smooth them by a Savitzky-Golay filter because I want to keep the magnitude of the signal. a) Is there a ready-to-use Filter available for that? b) what are ...
19
votes
1answer
3k views

How to demodulate an FM signal in continuous-time?

I'm not sure if this is a math or Mathematica question, but I'm posting it here because I'm interested in possible Mathematica tools/functions to solve the problem. I'm stuck. I want to simulate ...
18
votes
4answers
6k views

Numerical Fourier transform of a complicated function

Say I have a function $f(x)$ that is given explicitly in its functional form, and I want to find its Fourier transform[1]. If $f$ is too complicated to have an analytic expression for $\hat f(k)$, how ...
16
votes
4answers
6k views

Plotting Fourier spectrum versus frequency of a signal

I have looked around here, and i am sure this has been answered, but i don't understand it. The thing is, I have taken a introductory signal processing course, and we had to use Mathematica, and i had ...
16
votes
2answers
494 views

Cluster a signal into areas of equal intensity

Introduction I have a greyscale photograph that I want to partition into areas of equal intensity. This means, that the integral over each partition should be (roughly) equal. There is no unique ...
15
votes
3answers
1k views

What is Mathematica's equivalent to MATLAB's filter function?

The MATLAB code filter(0.5,[1, -0.5], [1:10]) is equivalent to Rest@FoldList[(#1 + #2)/2. &, 0, Range[10]] I don't ...
15
votes
6answers
4k views

How do you find the frequency and amplitude from Fourier?

Edit This is a popular question with several answers. This edit organises the answers and gives links. Fourier just gives y values (ordinates) if you wish to read off frequencies and amplitudes you ...
14
votes
4answers
648 views

Cross-Correlation with TimeSeries

How to find hidden relationship between two TimeSeries data sets? I normally compute the Cross-Correlation function, but I cannot find an easy way of doing this on the TimeSeries objects in ...
12
votes
4answers
486 views

Segmentation of a microscopy image with uneven illumination

I am trying to do a little image segmentation on some cells taken from microscopy images that have uneven illumination. I am having trouble getting the background of the image cleaned up after ...
12
votes
0answers
232 views

Strategies to find curves on messy data using FindCurvePath

I have a set of data points that correspond to roots of a transcendental equation with respect to a parameter (the abscissa) which, by the properties of the system, define continuous curves (might be ...
11
votes
1answer
260 views

How can I use Mathematica to numerically compute a Wigner spectrogram of an optical pulse?

This question was inspired by this question where it is necessary to numerically compute the Fourier transform of a Gaussian optical pulse with a Gaussian chirp function. $$E(t)=e^{-t^2} \cos(50 t - ...
10
votes
1answer
404 views

Wavelet transform order problem

I have a signal that I'm trying to study its time-frequency features by continuous wavelet transform. By choosing different wavelet order, I get some differences in the results. ...
7
votes
1answer
3k views

Hilbert-Huang transform package

I am trying to learn Hilbert-Huang transform (HHT) and its applications (especially in ECG signal processing). There are several HHT packages (scripts) HHT for R and Matlab. Is there any known ...
7
votes
1answer
167 views

Why the BandpassFilter is different than applying LowpassFilter then HighpassFilter

If I generate some data with noise, and use a filter to filter the noise, why does BandpassFilter not produce the same results as using ...
7
votes
1answer
376 views

How to extract notes and chords from audio?

I have a 3-second recording of a guitar chord which you can safely download here. I'm trying to use Mathematica's wavelet features to find out the notes in the chord, at least the docs says that ...
7
votes
2answers
367 views

Building Butterworth Bandpass Filters

In order to bandpass filter data it is necessary to use ButterworthFilterModel, followed by ToDiscreteTimeModel and RecurrenceFilter. I have two questions: I wish to specify the order of the ...
7
votes
1answer
688 views

How does Mathematica's LowpassFilter work?

I don't really understand the documentation for the LowpassFilter[] function in Mathematica. In the course I have about signal processing, low-pass filters come in ...
6
votes
6answers
249 views

How do I build a patterned matrix (high-pass and/or low-pass filter bank)?

I would like the shortest code to build the following matrices, of arbitrary dimension $N$: A Low-Pass filter bank matrix is of the form $ \begin{bmatrix} 1 & 1 & 0 & ...
6
votes
3answers
2k views

How to properly plot a response of a transfer function in Mathematica?

I'm trying to display the output response of a transfer function in Mathematica with and without a compensator. The problem is very strange: while the transfer function compensate is showing well, the ...
6
votes
3answers
3k views

How can I obtain a smooth curve from my data but preserve two inversion points

I have a list of data points, {x, y}, my data. When I plot them, the curve is jagged. I want to smooth the curve and preserve the two sharp corners. This is a plot ...
6
votes
1answer
268 views

How to make sense of LowpassFilter, SampleRate and the cutoff frequency ωc in different Mathematica versions?

How do you make sense of the scale of "time" and "sampling" when using LowpassFilter and SampleRate ? Given the test data with ...
5
votes
3answers
237 views

Find when two lists are parallel with autocorrelation

I am working on a signal processing project with two oscillators. The first oscillator has a frequency $f_1$ that is independent, and the second oscillator has a frequency $f_2$ that increases, and ...
5
votes
3answers
623 views

How to generate a chirped signal

As there is no ChirpSignal function in Mathematica, can anyone tell me how to write a custom function to generate a sinusoid with a frequency that changes ...
5
votes
1answer
180 views

How to fit data to a convolution equation

How to fit data to a convolution equation: ...
5
votes
1answer
197 views

Looking to create a lesson on sensory perception of sound

I'm looking to show students a lesson on sensory perception, more specifically on masking. I know a little Mathematica but sound processing has evaded me. I would like to create a white noise and ...
5
votes
0answers
440 views

Wavelet Transform Modulus Maxima (WTMM) method

Has anyone already coded the Wavelet Transform Modulus Maxima (WTMM) method for computing the singular spectrum using multi fractal formalism in Mathematica? The goal is to analyse 1D, 2D and 3D ...
5
votes
0answers
236 views

Resources for Sound Synthesis & Design

Are there any resources for sound synthesis using Mathematica? This page, Mathematica: Audio Synthesis Software, refers to other software packages, e.g. Max/MSP and Csound, for real-time synthesis. ...
4
votes
4answers
834 views

Why does Fourier give a shifted frequency?

I have a signal that I want to identify the frequencies in it, I used the Fourier function but I can't get the frequency correctly. Here is a simplified example: ...
4
votes
2answers
333 views

FindPeaks does not smooth noise on peak?

I have experimental data which is noisy. My objective is to find the peaks. Here is a short part of the data. ...
4
votes
1answer
361 views

Butterworthfilter data filter

I am currently doing a signal analysis and filtering using Matlab. The filter I am using is Butterworthfilter model to filter scattered data (vector data). I am using Matlab as follows: ...
4
votes
1answer
880 views

How to get the total intensity of a certain frequency range in an audio file?

Does anyone know how to get the total intensity of a certain frequency range in an audio file? Let's say an audio file has a frequency range from 0Hz to 20KHz, and I want to extract the total ...
4
votes
1answer
151 views

How do I bandpass a signal in Mathematica 8

I would like to use the bandpassing function that is available in newer versions of Mathematica but not Mathematica 8: ...
4
votes
0answers
54 views

What does OutputResponse[sys, { {u1,u2,u3}, {v1,v2,v3} } ] do?

I am puzzled by the result of OutputResponse[sys, {{u1,u2,u3},{v1,v2,v3}}]. OutputResponse is used this way in the first "Application" in the documentation for ...
4
votes
0answers
150 views

Bandpassing EEG's using Mathematica's Bandpass Function

Let's say we have an EEG signal approximated using a fractional Brownian motion: ...
3
votes
2answers
144 views

How can I filter this signal in mathematica

Given the transfer function $H(z) = \frac{1}{4}(1+z^{-1}+z^{-2}+z^{-3})$ and the input signal $x[n] = \cos(\frac{\pi}{50}n)+\cos(\frac{4\pi}{5}n)$, how can I find the output signal $y[n]$ in ...
3
votes
2answers
152 views

Compare two shifted signals

I have one set of original data (signal A) and a second set of derived data (signal B) which was computed from A by position rotation (circular shift). Here are the data for the signals (A and B): ...
3
votes
1answer
109 views

PrincipalValue option of Convolve not working in 9.0.1?

The PrincipalValue option of Convolve is used in this question to define the Hilbert transform. However, in Mathematica 9.0.1, ...
3
votes
1answer
419 views

Obsolete Signal Processing functions

I need some tools to detect the fundamental frequency and pitch of a sound. I Googled for "pitch detect" and found some .nb files that do these tasks, but all the files are in Mathematica 3.0 format. ...
3
votes
1answer
700 views

Wavelet vs instantaneous power spectrum

Following on from a previous question posted by @xslittlegrass and answered by @Sector and others, Extracting information from the result of ContinuousWaveletTransform I'd like to know if it is ...
3
votes
1answer
500 views

Plotting power spectral density from transfer function

I am new to signal processing. The equations below are given in $LaTeX$. I have the following transfer function (from the Dryden Model) for the two-sided Power Spectral Density: $$S(w) = ...
3
votes
1answer
91 views

Getting correct amplitudes with Periodogram

I'm having some trouble with the function Periodogram, mainly with getting it to produce correct amplitudes for the spectrum it returns. My question is how to fix ...
3
votes
0answers
71 views

Application of lowpass Butterworth filter

I'm trying to design a Butterworth lowpass filter with a cutoff frequency of So far what I did is ...
3
votes
0answers
184 views

Estimating Power Spectral Density from Autocorrelation

I have been tasked with computing the power spectrum of a noisy signal. Specifically, I am asked to do so through first attaining the autocorrelation function. From what I have read, the PSD is simply ...