# Tag Info

### How can I work on DSP using C/C++?

MATLAB is a desktop computing environment, that's designed to make it easy to do math in batches. And if you were to have access to the MATLAB source code, you'd find that as you dig down into it, ...
• 12.5k
Accepted

### Frequency shifting of a quadrature mixed signal

If you have a quadrature mixed signal, you have two outputs of the signal in 90 degree phase to each other. To complete a full complex frequency conversion (which would shift the frequency in one ...
• 50.1k

### How can I work on DSP using C/C++?

C/C++ is the standard language for real time and embedded signal processing. MATLAB is in most cases way too memory hungry and way too slow. There is a lot of signal processing happening in, for ...
• 44k
Accepted

### What is the difference between the PSD and the Power Spectrum?

The power spectrum is a general term that describes the distribution of power contained in a signal as a function of frequency. From this perspective, we can have a power spectrum that is defined over ...
• 1,422
Accepted

### Which image filter can be applied to remove gridded pattern from corrupt jpegs?

You can use a standard inpainting algorithm. These algorithms replace marked pixels in an image with the pixel values that surround these marked pixels. The challenge here is to detect the grid (my ...
• 6,218

### Why is it a bad idea to filter by zeroing out FFT bins?

This question has also confused me for a long time. @hotpaw2's explanation is good. You may be interested in the simple experiment using matlab. https://poweidsplearningpath.blogspot.com/2019/04/...
• 447
Accepted

### Use of "Audacity"for teaching undergraduate labs of digital signal processing for electrical engineering students?

That depends on a lot on your learning goals for the lessons and the lab. Audacity is primarily an audio editor designed for music recording and production. It has a lot of signal processing baked in, ...
• 44k
Accepted

### Python vs Matlab? Which one better for image processing?

[Comparison with cars at the end] For learning from scratch, I would not suggest a programming language alone, but instead the couple "teaching materials" (book, lecture notes) + "...
• 31.8k

### Applying DFT twice does not actually reverse an array. Instead, the first element stays in place while the rest of the array is reversed. Why?

The sequence is exactly what you should expect: $$x[-n]=x[N-n]\tag{1}$$ Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value. It seems like you were expecting to see the sequence $x[N-1-n]$ ...
• 89.5k
Accepted

### This is how my professor is finding the frequency response of an LTI system when given the impulse response. Is this wrong?

Your professor is right, and you're almost right too. The filter is clearly an FIR filter, but because its frequency response can be expressed as a geometric series, a recursive implementation is ...
• 89.5k
Accepted

### How to get scipy remez to give matlab firpm answer?

The firpm and remez commands return symmetric linear phase filter solutions. In order to create a symmetric linear phase high pass filter, you must have an odd number of taps (Type 1 filter, see chart ...
• 50.1k

### How to compute dBFS?

All the standards define dBFS as an RMS measurement, relative to the RMS level of a full-scale sine wave, so the calculation is: ...
• 15.7k
Accepted

### MATLAB: $\tt fft$ and $\tt ifft$ scaling

Whether or not to scale the forward FFT by 1/N depends on which result you want for further analysis: energy (preserving Parseval's identity), or amplitude (measuring height or volts, etc.). If you ...
• 35.3k

### Generating data with Gaussian distribution

Let $\Delta = [x_1, \dots, x_N]$ be your desired vector where $x_i$ are iid $\mathcal{N}(0,\sigma^2)$. Do you expect that $\mathrm{Pr} \left\lbrace ||\Delta||_2^2 < 0.5\right\rbrace = 0.9$ ? By ...
• 6,585
Accepted

### Correct way to add AWGN to a signal

Short answer 10*log(bw/fs) to take into account the oversampling operation because the awgn() function specifies the signal-to-...
• 6,585
Accepted

### FFT vs DFT Run Time Comparison (Complexity Analysis) in MATLAB

Abhinav Jain, Welcome to DSP Community. I build for you a proper testing of the run time comparison. Few tips about timing in MATLAB: Never time in a script. Always call a function to do the heavy ...
• 19.5k
Accepted

### Computing a convolution using FFT and more than minimum number of samples

Simply keep the first 1049 samples of the IFFT result and throw the rest away. You don't have to do a fftshift ...
• 3,218
Accepted

### Why the sum of filter coefficients of an FIR filter does not add to 1?

I'm assuming your FIR filters are nonrecursive tapped-delay line FIR filters. For such filters the sum of a filter's coefficients will equal the filter's gain at zero Hz (DC). This property results ...
• 5,757

### MATLAB: $\tt fft$ and $\tt ifft$ scaling

The scaling convention used by Matlab is common in DSP. You could also use the unitary DFT where both the DFT and the IDFT are scaled by a factor of $1/\sqrt{N}$. You could also use the factor $1/N$ ...
• 89.5k

### For 2D signals can it be said that the frequency response is the same as the Fourier transform?

Yes for 2D signals you can take a 2D fft, and if the 2D signal is represented in the time domain, then its fft is represented in the frequency domain. 2D FFT's have many other interesting ...
• 50.1k
Accepted

### Why is Scipy implementation of Hilbert() function different from Matlab implementation of the function?

It works fine for me: ...
• 15.7k

### Half power frequencies is -6dB or -3dB

The definition of the cut-off frequency is arbitrary. Different design methods use different definitions. If you define the cut-off at $-6\textrm{ dB}$, it means that the amplitude of a sinusoidal ...
• 89.5k
Accepted

### Can you decimate / downsample a signal in frequency domain just like you can interpolate / upsample it?

Your interpolation operation is an upsampling operation with subsequent low-pass filtering. This translates to zero-padding in the frequency domain. Given your original signal $x[n]$, you upsample it ...
• 6,218
Accepted

### Educational purpose - What is the correct way to simulate a multipath fading channel which has ISI

Lets say we want to transmit a sequence of discrete data $\left\lbrace x[n] \right\rbrace$. But because we are living in analog world, the sequence must be modulated. Call $T_s$ is symbol duration ...
• 6,585
Accepted

### MATLAB: Adding Noise with Regard to Signal to Noise Ratio (SNR) or EbNo?

These stuffs $E_s/N_0, E_b/N_0 \textrm{ and SNR}$ are convertible. \begin{align} E_s/N_0 &= E_b/N_0 + 10\log_{10}(k) \\ E_s/N_0 &= 10\log_{10}(T_{sym}/T_{samp}) + \mathrm{SNR} \end{align} ...
• 6,585
Accepted

### Sequential Form of the Least Squares Estimator for Linear Least Squares Model

Slope from all samples obtained To summarize the question's problem, you want to calculate the slope based on all samples obtained thus far, and as new samples are obtained, update the slope without ...
• 13.5k

### Covariance matrix for sine wave extraction

This is an unsolvable problem. When you add two sinusoidal tones of the same frequency you get a sinusoidal of the same frequency (even the possibility of one with zero amplitude). Adding five just ...
• 7,550
Accepted

### Deconvolution of Synthetic 1D Signals - How To?

You cant't recover the original signal through deconvolution. A Gaussian kernel is in essence a lowpass filter, i.e. it will remove information at higher frequencies from the signal. Once it's gone, ...
• 44k

### Python vs Matlab? Which one better for image processing?

I have spent the first 20 years of my career working extensively in MATLAB for signal processing applications. Six years ago I gravitated over to Python out of curiosity and it has since completely ...
• 50.1k

### Applying DFT twice does not actually reverse an array. Instead, the first element stays in place while the rest of the array is reversed. Why?

Yes reversed (!) but not in the programming sense ! The sequence $N \cdot x[-n]$ which results after applying DFT twice to the N-point sequence $x[n]$ is a time-reversed (and amplitude scaled by $N$) ...
• 28.1k

Only top scored, non community-wiki answers of a minimum length are eligible