New answers tagged

0

0.11Hz is 110mHz Vertical lines are due to the zoom; they're the bottom row ... zoomed: This is a purely visual effect, no data is added. To make the data zoom between 0 and 2mHz, increase nfft, then zoom the spectrogram. Why Matlab Spectrogram of slow and rarely sampled signal shows high frequencies The highest frequency it's showing is 110mHz, which is ...


2

pwelch() can return a one sided (default) or two sided spectrum. For one sided, the energy of negative frequency is added to the symmetric positive ones. pwelch() returns a spectral density in something like $W/Hz$ which is actually dependent on the sample rate. By default pwelch() assumes a sample rate of $2\pi$. Try pp = pwelch(x, ones(n,1), n-1, n,1,'...


0

Spectrogram given by MATLAB is right. The frequency axis shows frequency from 0 to 110mHz which is equivalent to 0 to 0.110Hz. mHz stands for milli-Hertz. There is no problem with that plot. Now the question is why we are seeing high energy components at all frequencies in the range 0 to 110mHz. That I think is because of the Aliasing effect. The sampling ...


0

Someone at Matlab chose the most idiotic defaults for x and y units as well as location of time axis in spectrogram(). Rather than fixing it, I just do [S, F, T] = spectrogram() and plot the results myself using imagesc() or pcolor() depending on if I want log axis or not.


2

I found out what I was doing wrong. Of course it was my mistake, not the authors of the authoritative text on DSP. I misunderstood the meaning of the parameter $A$ in the Rabiner and Gold formulation. $A$ is not (for example) 40 if you want the cutoff amplitude to be 40dB. Rather, if you want the attenuation in the stop band to be 40dB below unity (or -40dB) ...


1

It describes a SIMO (single input, multiple outputs) system. In your case you have two outputs, described by the two different numerator polynomials.


1

At level 1, the discrete Haar wavelet transform reduces to a 2-tap discrete derivative, downsampled by a factor of two. This downsampling is the main reason for the wavelet shift-variance, and for missed "pulses" or discontinuities. For instance, if your signal is: $$ [0,\,0,\,1,\,1,\,0,\,0,\,0,\,0]$$ the two-tap derivative will yield: $$ [0,\,1,\,...


1

Hints where are all zero locations? What's the value of the transfer at a frequency that falls directly on a zero? Combine 1 and 2


0

Revisiting this question for a more definitive/intuitive answer. I've added reasoning here that shows real wavelets are a fair game for one integral reconstruction - along conditions on the entire filterbank. Still, what exactly allows for CWT(x).sum(axis=0) == x? First, observe that, for a wavelet symmetric about $t=0$ and $\psi(t=0) \neq 0$, like Morlet, ...


0

I take 256 samples at 10kHz, I would recommend starting with a larger data set. It's much easier to see what's going on. I expect that the vibration from the string to be less than 500Hz Even the fundamental of most guitars can go over 1 kHz (18th fret in the high E string). In addition to that you have the harmonics plus the transients from the plucking. ...


1

You have a input signal $x(n)$ (the colored noise in your case) and a desired output signal $d(n)$. Assuming that the FIR coefficients are real. Define the filter weight vector $\mathbf{w}$ and the input vector $\mathbf{x}(n)$ $$ \mathbf{w} = [w_0, w_1, \ldots, w_{N-1}]^T $$ $$ \mathbf{x}(n) = [x(n), x(n-1), \ldots, x(n-N+1)]^T $$ The output of the filter is ...


1

Not a direct answer to how to compute the SNR for a sine wave (which I could instead show) as I want to first point out some significant limitations with that approach and then have the OP consider if an SNR for a sine wave test tone still makes sense for the given application. The typical SNR metric is for SNR in band, and for that the filter would pass ...


0

This is an old question, but I recently ran into this problem myself and spent a lot of time trying to figure it out. @brlauwer324 provides the answer in the comment: x(1:12) should be initialized to zero. Here's the MATLAB code: function y = lowPassFilter(x) %y(n)=2y(n-1)-y(n-2)+x(n)-2x(n-6)+x(n-12) y = zeros(1,21600); y(12) = 0; y(11) = 0; ...


0

I would suggest comparing the output of your code with known methods already implemented on MATLAB. You can use PERIODOGRAM to plot the periodogram of the signal and check whether there is an error in the code or in the acquisition. The periodogram $pxx$ and the FFT $F$ are related as follows: $|F|^2=pxx$. Make sure to check the documentation to use a ...


0

If you have freequency components in a regular raster, we call these harmonics. A perfect harmonic oscillation has only one frequency component, but everything that is periodic, but not perfectly sine-shaped will have frequency components at multiples of its fundamental frequency. That fundamental frequency seems to be 12.5 Hz in your case. So, look for ...


4

The issue is we are looking for likeness but the values are scaled beyond that metric. In the OP’s construct all symbols used should have equal weight toward the correlation determination; for example, the symbol "1" matching symbol "1" should carry just as much weight as symbol "6" matching symbol "6", but in the ...


4

The function is given by: $$ f \left( \boldsymbol{x} \right) = \frac{1}{2} {\left\| \boldsymbol{x} - \boldsymbol{g} \right\|}_{2}^{2} - { \boldsymbol{y} }^{T} \left( \boldsymbol{r} - \boldsymbol{w} \odot \left( D \boldsymbol{x} \right) \right) + \frac{\rho}{2} {\left\| \boldsymbol{r} - \boldsymbol{w} \odot \left( D \boldsymbol{x} \right) \right\|}_{2}^{2} $$ ...


Top 50 recent answers are included