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
1
vote
1answer
34 views

Convolve audio signal with filter with different sampling rates

I would like to convolve two signals: Room impulse response that was obtained by deconvolution, measured at 48 kHz. Truncated to 8192 samples. Anechoic recording (.wav) recorded at 41.1 kHz If I ...
4
votes
2answers
66 views

The Effect of Spatial or Temporal Averaging on Noise Properties

I generate two noise images using MATLAB's function imnoise(). If I average the two noise images, the resultant image looks like the original noise image but only ...
0
votes
0answers
78 views

Calculating complex AWGN in BPAM and QPSK

I was trying to add complex AWGN in a BPAM and a QPSK signal, manually. However I started using formulas as it is shown below (e.g. in BPAM) but the result was not the expected (also using as a ...
0
votes
1answer
34 views

How implement the depicted system ( ILPF/IHPF ) in Matlab

How implement the depicted system ( ILPF/IHPF ) in Matlab ? ILPF = inverse transform low pass filter IHPF = inverse transform high pass filter
5
votes
1answer
105 views

Building a Pipeline for Image Classification / Clustering Tasks with Features Extractor and Dimensionality Reduction (Example on MNIST Data)

In MNIST, there are 28x28 images of hand written digits. What features would one extract in order to classify then without any Deep Learning involved? How does Dimensionality Reduction get in the ...
0
votes
1answer
55 views

How to find complex envelope of a signal in MATLAB?

The transmitted signal $$x(t) = A_c \cos(2\pi f_c t+\phi),$$ I know mathematical expression of complex envelope and its derivation, but how to find its complex envelope in MATLAB? Assume that $A_c = 3$...
4
votes
1answer
64 views

Image Clustering Using Linear Discriminant Analysis (LDA) Compared to t-SNE / UMAP

This is a a continuation of the discussion from Unsupervised Clustering of Images. Image that we have MNIST database and we want to separate all the images like this. But we want to use Linear ...
0
votes
1answer
46 views

How can I verify my code?

...
0
votes
0answers
31 views

Theory behind the matlab butter function with the parameters n and [Wl, Wh]

I am writing the theoretical background in my thesis but my thesis is more centered on deep learning and the signals that I am using for classification were filtered through the ...
0
votes
0answers
64 views

Scalar vs Vector signal Quantization

I am studying about scalar vs vector quantization, and I have an assignment to implement (in MATLAB) a scalar quantizer , using the Lloyd-Max algorithm, and a vector quantizer via k-means clustering. ...
-2
votes
0answers
19 views

power spectral density by using fft sailing factor [duplicate]

I saw power spectral density scaling by squared abs(fft) by 1/(fs*N) and also by frequency bin fs/N. please tell me that which is correct?
1
vote
0answers
65 views

Error in the computation of PSF?

I am in trouble computing a PSF of an optical system in optical turbulence. Background The optical transfer function (OTF) for an imaging system in optical turbulence can be modeled as the product of ...
0
votes
1answer
35 views

The compensation for the output signal emission by using the digital non-recursive FIR filter

I have problem with how achieving the compensation (reduction) for the output signal emission that occurs when change abruptly the coefficients of the digital filters. for the better compensation,Is ...
2
votes
3answers
156 views

Understanding FFT output in Matlab

I'm very new to Fourier transform and I want to plot the Fourier transform of an image in Matlab. I've seen many examples and in all of them, the fft() of the image is a black picture with some white ...
1
vote
2answers
56 views

Bode plot of the transfer function with unstable pole

Let's say I have a LTI system described by following transfer function $$G(s) = \frac{(s+1)}{s(\frac{s}{10} - 1)}.$$ As soon as I run following Matlab code ...
1
vote
1answer
42 views

How can THD (Total Harmonic Distortion) be applied to compare between two signals ( for example between original and encoded signals)?

I would like to compare between two signals (original signal and its encoded version) and plot the scores) as we do with STOI and PESQ. should we calculate the THD for each single signal separately ...
4
votes
1answer
56 views

How accurate is the dominant poles approximation in higher order control systems?

From what I have learnt from control systems classes, the dominant poles of a system are those that can be used to analyze a higher order system in terms of the formulas of a 2nd order system. I took ...
1
vote
1answer
30 views

Identifying system to represent output data as combination of 3 input data

I have some numerical data, which has 3 input vectors and 1 output vector. I have to use all the inputs to represent the output. I am new to dsp and struggling to understand how to do this. X1: Mostly ...
5
votes
1answer
96 views

Unsupervised Clustering of Images: Which Algorithms?

Given a set of images $ \left\{ \boldsymbol{x}_{i} \right\}_{i = 1}^{N} $ how could one cluster them in an unsupervised manner? What are the useful features / tools to do so? For instance, will ...
0
votes
1answer
25 views

Compute inverse IRF from FRF impact testing

I have a measured FRF by impact testing and I have computed the IRF by ifft(). Now I want to compute the inverse IRF. I have read many posts in this forum about inverting FIR filters. As far as I ...
1
vote
1answer
36 views

Why phase response returns different values for Sliding DFT(1440 degrees for N=32 and f= 40kHz) and r-Sliding DFT and goertzel (0 degree)

While simulating the SDFT ,rSDFT and Goertzel DFT i got phase responses to be different for SDFT and rSDFT. As Goertzel and rSDFT have are derived from same SDFT structure why there is so much ...
6
votes
1answer
45 views

How Are MATLAB's `cpsd()` and SciPy's `csd()` Related?

I am trying to determine an estimate of the H1 transfer function between two acceleration signals in Python. To do this, I am calculating Pyx using ...
0
votes
1answer
64 views

Calculating tranfer function, poles, zeros and impulse response given input and outpul signals in matlab

I have been given an input and output signal. input: x(n)=(0.3^n)*u(n) + (5^n)*u(-n-1) output: y(n)=(3^n)*u(-n-1) - ((2^(n+2))/(3^n))*u(n). or x=(0.3.^n).*(n>=0) + (5.^n). *(n<=-1) --> in ...
5
votes
1answer
79 views

Applying Convolution in Frequency Domain by Element Wise Multiplication on Time Domain

I'm studying the power spectrum. Right now, I am making a program to try to make sure that the "Fourier transform of the multiplication of some data and window function" and the "...
0
votes
0answers
13 views

How to find response of step function in matlab and plot transfer function?

I have an transfer function: Y(s)/F(s) = (s^2+2s+3) / (s^4+6s^3+13s^2+12s+9) How can I find Y(s) response of step function if f(t)=sin(5t) in MATLAB. And how can I plot the transfer function? Thank ...
2
votes
0answers
35 views

Scatter plot of two signals - Shows independence?

If we have 2 signals, and we want to show that they are independent, I came across a reference where the scatter plot for both was shown, and from the scatter plot, it was written that the signals are ...
0
votes
0answers
33 views

Is this an appropriate way to calculate power and relative power for individual spectral bands (EEG, MATLAB)?

I apologize in advance if this is a dumb question, I'm really new to this kind of analysis. Essentially I have my EEG signal (EEG1) and I'd like to calculate the power and the relative power in each ...
0
votes
2answers
66 views

Removing noise from an audio file only in time domain?

Hello I am doing some work for a course and I need to take an audio file and remove the noise from it. So far I've removed the noisy signal which is a 1000Hz pure tone using the frequency domain. I ...
0
votes
0answers
20 views

Best way to reach experts in the Synthetic Aperture Radar (SAR) Simulation field?

I'm looking for Synthetic Aperture Radar (SAR) Simulation experts and struggling to find them (context: synthetic data for geospatial applications). I've found a few users in this community who could ...
0
votes
0answers
25 views

How come my Bit Error Rate doesn't change at all when going from an uncoded system to a system using Hamming Codes?

I have the task of investigating the Coding Gain for a (15, 11) Hamming code using hard-decision BPSK modulation in an AWGN channel. From lecture slides, the theoretical BER without coding is: p = 0.5 ...
0
votes
1answer
28 views

Y axis Component of Rxy in MATLAB

I calculated the $R_{xy}$ by cross-correlating $x(n)$ and $y(n)$. Now, in the MATLAB command window, I wish to construct the Y-axis component of $R_{xy}(n)$. I'm not sure how I'm going to do it. Is ...
0
votes
0answers
19 views

How can I generate X Axis componant in R_xy in MATLAB?

Let's say I have cross-correlated $x(n)$ and $y(n)$ and got the $R_{xy}(n)$. Now if I want to generate the x-axis component of $R_{xy}(n)$ in the command window of MATLAB. How can I do that? is there ...
0
votes
2answers
114 views

Unexpected Sidebands on the Frequency Spectrum

I am working on an alternative approach for a specific signal processing sequence which involves a kind of a test that I am using for justify the mathematical background of the design. The test is ...
0
votes
0answers
49 views

HackRF setup for capturing GNSS signals

I have a MATLAB script which process IF signals to acquire GPS satellites. I decided to capture IF signals containing GPS L1 C/A (1575.42 MHz) myself. What I have: HackRF TCXO for HackRF Active GPS ...
5
votes
1answer
38 views

The Proper Way to Do Sinc Upsampling (DFT Upsampling) 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 upsample it in the frequency domain (Sinc interpolation)? Note: Added as a request by the answer ...
0
votes
0answers
25 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 ...
1
vote
0answers
21 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 ...
1
vote
1answer
51 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 ...
10
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
0answers
20 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&...
0
votes
1answer
41 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
0answers
22 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 ...
0
votes
0answers
25 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 ...
5
votes
1answer
56 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
1answer
58 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 ...
4
votes
1answer
53 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
0answers
15 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
28 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 ...
0
votes
0answers
34 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
0answers
39 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
2 3 4 5
56