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
0
votes
1answer
53 views

Design the coefficients of Wide-band FIR filters [closed]

It will be a great help if someone could share a content/tutorial about how to design the coefficients of Wide-band FIR Filters.
1
vote
1answer
867 views

How can I transform a time signal into a third octave spectrum?

I try to make a third-octave spectrum from a time signal and I have some troubles with the algorithm. I'm not an expert in signal processing so I don't know what is wrong. Here what my algorithm ...
0
votes
1answer
197 views

convolve to differentiate black and white colors

a figure for instance of size 500*500 has half above part with black and below half white should result in a white line where the white meets the black (something like a single line at line 250 with ...
0
votes
3answers
77 views

Recover an OFDM signal affected by AWGN

I have an OFDM signal affected by AWGN, if I know the power of the gaussian noise, can I recover the OFDM signal? Can I perform deconvolution to recover the original signal? thanks
1
vote
1answer
292 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
vote
1answer
181 views

Difference between applying a window to a whole signal and frames.

I'm going to do feature extraction using a speech signal. The first step is the windowing of the signal using Hamming window. I'd like to know if I should apply one single window to the whole ...
1
vote
1answer
503 views

Bandpass filtering an audio signal with MATLAB's $\tt kaiserord$: unknown new frequency component

I am trying to filter an audio signal with kaiserord in MATLAB, but I'm having a problem. Here is my code: ...
0
votes
1answer
40 views

Trying to do frequency analysis of an accelerometer output

I am new to signal processing. I have a 3 axis MEMS accelerometer. I have read its output into $\mbox{Matlab}^{\tt TM}$. My problem is that the signal I am trying to isolate has a frequency of about 0....
1
vote
1answer
560 views

Confusion about ensembles and averages in autocorrelation matrices

I just noticed that until now I often don't cared about the scaling of the autocorrelation Matrix in Matlab. I then checked with the book Statistical Digital Signal Processing from M. H. Hayes. There ...
0
votes
1answer
69 views

Why is the Fourier transformation full of spikes with 12.5 Hz frequency steps?

I am performing a fourier transformation in matlab for time signal data with monitoring points for pressure extracted from a simulation. What I get at the end is a spectrum as shown below: I am ...
0
votes
0answers
19 views

How to design function for Random Decrement technique in python and implement the function?

I was looking into a technique called Random decrement technique from the following links/articles: How can I use Random Decrement Method to convert a non-stationary signal into a decay function ...
0
votes
0answers
18 views

Pls help me, i dont know why i cant train Harcascade object detector . I dont see many information in google [closed]

[ -I have a homework that: Create a new train cascade object detector to detect any a object. And i choose detect stop sign. And i use code in youtube . This is the youtube link:https://www.youtube....
0
votes
1answer
129 views

Image reconstruction using Irradiation

I am a bit confused as to how to go about this. I have a surface [x,y,z] given by: ...
1
vote
1answer
360 views

Complex Data type not accepted in Simulink

I am having an issue with the interaction of the Matlab function block in the Simulink with my model block. Below you can also find the picture. I have created a Matlab function with three inputs and ...
3
votes
2answers
400 views

Why is the relationship between Es/N0 and SNR different for complex and real signals?

I try to use the AWGN Channel model of MATLAB to build my simulation model, but the explanation of the relationship between Es/N0 and SNR in the official manual of MATLAB makes me confused. It says ...
9
votes
6answers
3k views

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

I have been working on MATLAB for signal processing for a while. Many companies from DSP for a communication background has asked me whether I know C/C++ very well. I am confused as to why the ...
0
votes
1answer
650 views

MATLAB: $\tt freqz$ vs $\tt bode$

I started studying DSP recently. In my MATLAB assignments, I am often asked to plot the frequency response of a digital filter using freqz. I know there's another ...
1
vote
1answer
38 views

Converting a Matlab filter-design to Matlab code and obtaining filter coefficients

Central problem (Abstract): Using the Matlab filter-designer results in direct-form II transposed coefficients, which i need. However, generating Matlab code from the filter-designer app itself does ...
1
vote
1answer
1k views

Envelope detection in frequency domain with MATLAB

I need to compute the envelope of a spectrum in MATLAB. Is there a specific function that can do it? I saw the function [yupper,ylower] = envelope(x,np,'peak') ...
1
vote
1answer
105 views

Finding the Correlation Matrix of Wiener Filter using MATLAB

I have the problem below and need to solve it using Matlab. I not a big expert in Matlab and just don't know how to implement it. Basically, it says that \begin{equation} R\:=\:\left[X\left(n\right)X^...
1
vote
0answers
20 views

Group Delay of a GLP [closed]

I am trying to understand what is the Group delay from a given figure. I was given an assignment with the following figure: and was asked the following: "what is the group delay (in the passband ...
0
votes
1answer
161 views

How do I create a polar plot from a multi-channel sound file?

I have a multi-channel sound file from a microphone array. I want to get the polar plot in Matlab in order to get the directivity patter of the sound source. How do I do this? I did the FFT on the ...
0
votes
0answers
18 views

MATLAB ambigfun not working

I'm getting an error when I try to use MATLAB's ambigfun. The error message is: "The pulse is longer than the available data in X." There is no "X&...
5
votes
2answers
841 views

How to Reduce Phase Lag Caused by Kalman Filter

Background I have been developing a system using a moving robot with a distance sensor against another robot. I want to control these robots by estimating relative velocity and acceleration derived ...
6
votes
1answer
2k views

Computation of the Inverse DCT (IDCT) Using DCT Or IFFT

Is there a way to compute the inverse discrete cosine transform (type-2) by leveraging either a DCT, FFT, or IFFT algorithm? I have seen ways to compute the DCT using FFTs, and I've seen ways to ...
0
votes
1answer
526 views

Step response of feedback system

We have a feedback system F(s) as in this figure: and this is the step response of G(s): and H=10. F(s): We got the root locus of the system F(s) as this: then we determined the gain at ...
0
votes
1answer
67 views

Having Problem about DownConversion

I hope, you are doing well. I want to ask question about baseband conversion. Background: I generated two AM signals in MATLAB, which one of them is shifted in time. I multiply the signals with $\cos(...
2
votes
1answer
42 views

Feedforward disturbance signal compensation

The reference Feedforward control concepts through Interactive Tools says, to minimise the effect of the disturbance $d$ on the process output $y$, a compensator $G_{\text{ff}}=P_3/P_1$ shall be used. ...
0
votes
1answer
38 views

Result of convolution using FFT method not accurate in time

I am trying to implement fast convolution between a signal and complex Morlet wavelets. To make the result equivalent to a linear convolution, I let the MATLAB fft function zero-pad both the signal ...
0
votes
1answer
23 views

Defining a discrete sequence along an arbitrary time axis

I need to compute the output of the system y[n] = x[−n]. x[n] is of length 1 : 26866, and the y[n] output axis has the same length and goes from -12850 : 13975. variables: x[n] = x1, output axis y[n] ...
0
votes
0answers
13 views

Magnitude-squared coherence using pwelch function yields different results than mscohere

I am trying to reproduce mscohere function from Matlab. $$C_{xy}(f) = \frac{\left\lvert P_{xy}(f)\right\rvert^2}{P_{xx}(f)P_{yy}(f)}$$ This is inside Algorithm section in docs for mscohere: mscohere ...
4
votes
1answer
41 views

Solving a Weighted Basis Pursuit Denoising Problem (BPDN) with MATLAB / CVX

Following up from an answer by @Royi on adding weights to BPDN problem , I would like to use CVX to test this approach. How can we formulate in CVX the regularized LS L1 norm with weights given by a ...
0
votes
0answers
24 views

Why does my output signal look like this?

This is a coherent demodulation of a BPSK signal. I'm using this link as a reference However my demodulated output comes out with too many redundant values compared to the transmitter. This only ...
4
votes
1answer
44 views

Adding Variance \ Weights Information When Solving a Basis Pursuit Denoising Problem (BPDN)

Having a "measured" vector $\mathbf{y}$ with its statistics (counts or variance per element), one can use weighted least squares approach to solve the linear system $$\mathbf{A}\mathbf{x} = \...
0
votes
1answer
50 views

The scaling of FFT magnitude and phase

In Matlab, I simulated and graphed out the FFT of a signal composed of three pure sinusoids of distinct magnitudes and phases. Figuring out the scaling of the frequency axis is fairly straightforward ...
0
votes
1answer
130 views

Plotting Frequency Response Magnitude and Phase for first order all pass filter

Having trouble plotting the frequency response characteristics for first order all pass filter. The Magnitude is expected to be constant across entire freq and Phase is expected to be only decreasing (...
0
votes
0answers
12 views

IF Data for GPS C/A and B1C Signals

I am testing a custom GNSS receiver in MATLAB environment. The receiver is developed for GPS C/A and Beidou B1C signals. I need two short lengths (1 min) IF data for two basic scenarios. I could not ...
0
votes
1answer
21 views

Failing to use Cross-Correlation to find position of measurement sequence in data-stream

Recently I used two measurement systems to record a quantity. I made sure both use the same sampling frequency. One system was recording continuously while the other one was operated to only record ...
1
vote
2answers
139 views

Matlab - Bode plot of Lag Filter + Integrator

I am rather new to Matlab and I just cant make sense of what I see in the bode plot of the continuous and discrete version of the same function. The bode plot of the continuous function looks as ...
0
votes
0answers
15 views

How can i generate training progress plot from saved trained model in matlab?

I would like to know is there any ways to generate back the training progress plot or verbose result from the saved trained model if i forgot screenshot/save both data manually? the code that i use to ...
0
votes
2answers
60 views

Apply Transfer Function in Continuous Domain in Matlab

I have the coefficients of a transfer function (i.e. numerator and denominator) in Laplace domain. How can I apply this to an input waveform using MATLAB script? I am looking for a function or piece ...
0
votes
0answers
35 views

Why psnr function in matlab returns a negative value for an image corrupted with Cauchy noise?

I have written the following matlab code for producing a noisy image corrupted by Cauchy noise but when I compute the psnr value of the noisy image using psnr function in matlab, it returns a negative ...
1
vote
1answer
124 views

Popping sound after using bandpass filter

I'm trying to create guitar Wah Wah effect (basically band pass filter with dynamic frequency range). I'm using Steinberg SDK for it. I refactored this code to work in real time and it looks like this:...
1
vote
4answers
642 views

Matlab: Detect Peaks and Signal Jump

I want to detect 6 peaks in a signal. I am open to any suggestions. There is one problem where my signal sometimes jumps high and stays higher than the rest of the signal. I don't know why this ...
0
votes
1answer
31 views

How to interpret fft2() plots for images in MATLAB? What are represented by axes?

I got the frequency spectrum of a grayscale image using ...
4
votes
1answer
95 views

Wrong result when realizing fixed-point biquad IIR filter

I'm implementing a fixed-point direct form I biquad filter with Q1.15 precision. I use fraction saving to improve quantization error. However, my function gives me the different results compared by ...
0
votes
3answers
1k views

Converting PSD to Time Domain Signal

I am currently using MATLAB and I'm thinking if I can reconstruct PSD back to time domain signal using MATLAB's ifft. I found a link in solving this problem but it's in Phyton and when I tried it in ...
0
votes
1answer
100 views

I need to insert an underwater acoustic channel model to an existing code that compared between OFDM and GFDM

The acoustic channel model that I have will output the channel impulse response. However, my signal is modulated in frequency domain (by doing fft). Hence, I want to obtain a frequency response of the ...
1
vote
1answer
165 views

How does Matlab's filter() return a signal of the same size?

Discrete Time Signal Processing by Oppenheim says that for the product of two DFTs (i.e. circular convolution) to be equal to linear convolution, the DFTs must be at least P + L - 1 long where P and L ...

1
2 3 4 5
56