Questions tagged [matlab]

MATLAB (MATrix LABoratory) is a numerical computing environment and a fourth-generation programming language. Use this tag with care.. see excerpt.

Filter by
Sorted by
Tagged with
2
votes
1answer
345 views

How determine the delay in my signal practically

I am trying to practically determine filter group delay so that I can try to reduce or adjust for it. I have tried all kinds of methods but still can't get the right result. I know that theoretically ...
9
votes
2answers
9k views

Frequency shifting of a quadrature mixed signal

I've a quadrature mixed signal with 10 MHz as highest frequency available. I want to shift it to any frequency lesser than 10 MHz. I should get it by multiplying this signal by cosine of the required ...
16
votes
2answers
29k views

How do I manually plot the frequency response of a bandpass Butterworth filter in MATLAB without freqz function?

I have code like below that applies a bandpass filter onto a signal. I am quite a noob at DSP and I want to understand what is going on behind the scenes before I proceed. To do this, I want to know ...
13
votes
12answers
33k views

Deconvolution of 1D Signals Blurred by a Gaussian Kernel

I have convolved a random signal with a a Gaussian and added noise (Poisson noise in this case) to generate a noisy signal. Now I would like to deconvolve this noisy signal to extract the original ...
32
votes
2answers
34k views

What is the advantage of MATLAB's filtfilt

MATLAB's filtfilt does a forward-backward filtering, i.e., filter, reverse the signal, filter again and then reverse again. Apparently this done to reduce phase ...
0
votes
1answer
757 views

Using fourier coefficients to reconstruct data in matlab

When doing a discrete fourier transform on some data using matlab's fft function, its output is a set of fourier coefficients but I was wondering how do I go about converting these into an and bn so I ...
18
votes
6answers
26k views

How to Generate Band Limited Gaussian White Noise in MATLAB?

In some papers, I read that the additive noise is band limited Gaussian white. How can I simulate this type of noise use MATLAB?
11
votes
3answers
3k views

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

In MATLAB, the outputs of the fft and/or ifft functions often require additional processing before being considered for analysis....
3
votes
1answer
1k views

Applying Image Filtering (Circular Convolution) in Frequency Domain

To filter an image we can: Use a 3x3, 5x5, 7x7, etc. filter, that is convolve the image and the filter in the space domain. Use a FFT on both the image and the filter, multiply them together in the ...
26
votes
4answers
15k views

How to Extrapolate a 1D Signal?

I have a signal of some length, say 1000 samples. I would like to extend this signal to 5000 samples, sampled at the same rate as the original (i.e., I want to predict what the signal would be if I ...
13
votes
4answers
22k views

Efficiently calculating autocorrelation using FFTs

I'm trying to calculate an autocorrelation on a platform where the only accelerated primitive I have available is the (I)FFT. I'm having a problem though. I prototyped it in MATLAB. I am, however, ...
11
votes
2answers
27k views

Image Reconstruction:Phase vs. Magnitude

Figure 1.(c) shows the Test image reconstructed from MAGNITUDE spectrum only. We can say that the intensity values of LOW frequency pixels are comparatively more than HIGH frequency pixels. Figure 1.(...
5
votes
3answers
8k views

Generalized Cross Correlation

What is the definition of Generalized Cross Correlation? I need it for estimating the delay (time offset) between two audio signals. The time offset between the two signals might be as large as 500ms....
4
votes
3answers
2k views

Vein extraction from this image

I have this image: What methods should I use to extract the veins from this image. Thank you.
7
votes
3answers
4k views

can't find out the period of my signal

I've a noisy signal, which is the sound of motor with a constant speed, so the sound "should" be periodic, I know that there is a way to use the autocorrelation function to get the period,I did it, ...
3
votes
1answer
1k views

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

Say I have a signal: [1, 1 , 1; 1 100 1; 1 1 1];, I wanted its frequency response, then can I take its FFT? Why does MATLAB have two functions to do the same ...
5
votes
1answer
4k views

1D Deconvolution with Gaussian Kernel (MATLAB)

Suppose that I know the output and the transfer functions of a system and I would like to calculate the input function using deconvolution. To get a grasp of the idea I have created a simple ...
0
votes
1answer
478 views

How can I find SNR, PEAQ, and ODG values by comparing two audios?

I have two audios, A and B. B is the noisy version of A. I want to know how much B is different from A. Can I do this by calculating signal to noise ratio (SNR), Objective difference grade (ODG), and ...
0
votes
1answer
2k views

Specific Frequency Resolution

I have an audio signal SampleRate Fs: 44100 Hz TotalSamples: 94144 samples Duration t: 2.1348 s The frequency resolution is given by ...
1
vote
2answers
1k views

Different way to separate a particular frequency from a signal

Let's say I have a signal which is composed of 2Hz,10Hz,17Hz,19Hz and 25Hz discrete time sinusoidal waves and I need to allow only 17Hz component to pass. As far as I know, the standard way to ...
4
votes
1answer
2k views

Use MATLAB to Restore a Signal from a Given Degraded Signal Using Tikhonov Regularization

Anyone could share how to develop an application in MATLAB to restore the signal from a given degraded signal using Tikhonov regularization i.e restoring the signal $f$ via solving $$ \min || g - f ...
3
votes
2answers
3k views

FFT analysis for Vibration Signal

I am working on balancing an air-spindle. For the unbalance analysis I use an accelerometer (NI device). I have the voltage signal from the accelerometer corresponding to the vibration of spindle at a ...
3
votes
3answers
4k views

recover image by only magnitude of image fourier transform

I have a image and I want calculate fft2 of it, after it I want recover image only by magnitude of it. how can I achieve this work? ...
33
votes
5answers
20k views

What Are the Best Algorithms for Document Image Thresholding (Example Inside)?

I'm trying to implement various binarization algorithms to the image shown: Here's the code: clc; clear; x=imread('n2.jpg'); %load original image % Now ...
0
votes
1answer
2k views

Real valued FFT in Matlab

I'm trying to compute FFT of size (N/2) for sequence of real values of length N. I'm using this recipe. Here is my code in matlab: ...
5
votes
4answers
8k views

How Can I Resample a Signal with an Arbitrary Factor (For Example - 128000Hz to 16000.1Hz) in MATLAB?

I need to simulate the sampling of a continuous (fsCtu = 128000Hz), acoustic signal with two microphones that have a slight offset in sampling rate (fsMic1 = 16000, fsMic2 = 16000.1) in Matlab. What ...
3
votes
1answer
4k views

How to Simulate AWGN (Additive White Gaussian Noise) in Communication Systems for Specific Bandwidth

I am trying to generate a AWGN waveform to add it to the signal of my simulated communication system. The operating bandwidth of the communication system is about ...
4
votes
2answers
3k views

Estimating the time offset (delay) between two audio signals in real-time

I'm looking for an algorithm which can accurately estimate the time-offset/delay between two audio signals in real-time. One audio signal is a loudspeaker signal and the other signal is the microphone ...
1
vote
1answer
164 views

Choosing right cut-off frequency for a LP filter in upsampler

I'm implementing a upsample function in Matlab but it's not perfect right now,for reasons I'm not sure. Here is my code: ...
3
votes
1answer
178 views

The Proper Way to Do Sinc Downsampling (DFT Downsampling) for Uniformly Sampled Discrete Signals with Finite Number of Samples

Given a signal $ \left\{ x [ 0 ], x [ 1 ], ..., x [ N - 1 ] \right\} $ what would be the correct way to downsample it in the frequency domain (Sinc interpolation)?
2
votes
1answer
100 views

Applying 2D Image Convolution in Frequency Domain with Replicate Border Conditions in MATLAB

I have created a function that filters an image (250x250) with a gaussian blur kernel (5x5) using FFT and IFFT. I am trying to get my filtered image to equal exactly the filtered image created by the '...
1
vote
1answer
259 views

2D DWT computation order

In 2D the discrete wavelet transform (DWT) of an image using lifting based 5/3 filter, if I perform a row-wise operation first then perform column-wise operation then I will get 4 sub-band LL, LH and ...
-1
votes
2answers
653 views

how filters noise of same frequencies(lms)

I am sharing my assumption. Please correct and guide me If I am wrong. I can't understand or thinking my assumption is wrong somewhere. We can decompose voice signal or noise signal into a number of ...
34
votes
7answers
22k views

Finding squares in Image

I need to find the squares in an image using OpenCV (no problem in matlab or any other, generally what i expect are some ideas). Consider the test image below : I need to find those coloured squares ...
14
votes
5answers
14k views

Time delay estimation of oscilloscope signals using cross correlation

I have recorded 2 signals from an oscope. They look like this: I want to measure the time delay between them in Matlab. Each signal has 2000 samples with a sampling frequency of 2001000.5. The ...
14
votes
2answers
53k views

how do I calculate SNR of noisy signal?

I am having problems in understanding how to do it practically I have a wav file that contains pure speech and another ave file that just contains the background noise (can be various things, such as ...
13
votes
3answers
4k views

Is sift a good way to extract features from an image?

I am trying to extract features from an image, but I have failed to get the points that I want to extract, and hence my image fails to match with the template. Are there any checkpoints that I have ...
4
votes
4answers
28k views

Question About $ Q $ Matrix (Model Process Covariance) in Kalman Filter

I am implementing my own discrete Kalman filter to estimate velocity from acceleration and position measurements (using Matlab ). I think I managed to deal with the $R$ matrix (measurements noise ...
19
votes
3answers
17k views

Help understanding Hough transform

I'm trying to get a Hough transform to work in MATLAB, but I'm having problems. I have a really bad way of detecting peaks that needs to be fixed, but before that I need to be able to reverse the ...
22
votes
2answers
17k views

How does resizing an image affect the intrinsic camera matrix?

I have a camera matrix (I know both intrinsic and extrinsic parameters) known for image of size HxW. (I use this matrix for some calculations I need). I want to use a smaller image, say: $\frac{H}{2}\...
14
votes
1answer
28k views

Converting frequency from $\textrm{Hz}$ to radians-per-sample

In MATLAB I have to pass cut-off frequency for designing a filter. But this Cut-off frequency is in radians-per-sample. How do I convert my analog Cut off frequency in $\textrm{Hz}$, into the required ...
12
votes
3answers
1k views

Image processing coding

I was wondering which is the best language for image processing? I know MATLAB has a good library and user community for it. I havent checked it out, its there for python as well. What is the most ...
3
votes
2answers
2k views

Frequency Analysis (DFT / FFT) of a Signal Without a Constant Sampling Frequency (Non Uniform Sampling in Time Domain)

I'm a stack exchange user for some time and now I'm registering to ask a simple question (I think!). I have a vibration signal with an amplitude and time (sampling frequency not constant) in a $...
8
votes
2answers
2k views

Physical Meaning of Negative Group Delay for causal LTI systems

I have implemented in Matlab (with minor variations) the example 5.1.2 "Illustration of Effects of Group Delay and Attenuation" I found in Alan Oppenheim's Discrete-Time Signal Processing 3rd edition. ...
6
votes
3answers
3k views

Using Total Variation Denoising to Clean Accelerometer Data

I know this is maybe a very basic question but I am doing this as a hobby and I can't find a solution to this problem. Basically I am trying to remove some noise from data I am reading from an ...
4
votes
1answer
3k views

inquiries for writing continuous wavelet transform codes manually

I want to write continuous wavelet transform codes manually by matlab. And I want to use complex morlet function. Here are some background: Continuous wavelet transform definition: $C(S,T;f(t),\psi (...
4
votes
4answers
933 views

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

I'm currently working on a project in which I need to find the tilt of a surface. Let's assume I'm only concerned with a single dimension tilt (i.e. slope) to begin. I currently have the ability to ...
2
votes
1answer
614 views

FIR to linear-phase FIR

I am trying to convert an FIR impulse into linear-phase FIR impulse, I need to remove the phase response, so when it is applied to a sound it only changes the amplitude response. Here is my code ...
12
votes
1answer
2k views

How to find the convolution kernel in frequency domain?

I have a two vectors of spatial data (each about 2000 elements in length). One is a convolved version of the other. I am trying to determine the kernel that would produce such a convolution. I know ...
10
votes
2answers
4k views

Generate the Convolution Matrix of 2D Kernel for Convolution Shape of `same`

I want to find a convolution matrix for a certain 2D kernel $ H $. For example, for image Img of size $ m \times n $ , I want (in MATALB): ...

1
2 3 4 5 6