Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
1answer
24 views

How to make sinewives with array input, for-loop functions and operate array with others [matlab]? [on hold]

Thanks to previous question, I got some clues to resolve this one. But, I still get some problems here. ...
-3
votes
1answer
20 views

How do I generate sine waves with MATLAB’s max operator and the plot the resulting values in dB versus log frequency?

I just start learning about matlab. Im very confuse with this. Can anyone gives me such an example solution or any kind of help? HINT: Put the desired input frequencies in an array and use a for-loop ...
0
votes
1answer
22 views

How to make semilogx to get a plot gain against log frequency with several values? [beginner]

Gain: 20 log (Vout/Vin) with Vin = 1.0. I've been searching for gain values: a. -156.48 dB b. -80 dB c. -53.98 dB d. -13.98 dB e. 3.52 dB f. 10.32 dB g. 13 dB h. 13.93 dB i. 13.96 dB j. 13.98 dB I am ...
0
votes
1answer
48 views

FIR filter design: evaluating the error function

Question 1 $$ H(e^{j\omega})=\sum_{n=0}^{N-1}h[n]e^{-jn\omega} =\mathbf{c}^H(\omega)\cdot \mathbf{h} \tag{1} $$ $$ =\mathbf{h}^H\cdot\mathbf{c}(\omega) \tag{2} $$ $$H(\mathbf{h})=\sum_{k=1}^Kh[k]e^{...
0
votes
0answers
21 views

Moving window quadratic form

What is the most efficient way to implement a moving quadratic form in MATLAB? I have a square $n \times n$ matrix $\mathbf{A}$, and I would like to compute $\mathbf{x}^\mathsf{T}\mathbf{A}\mathbf{x}$ ...
0
votes
1answer
51 views

Is this jumbled image due to difference between Matlab and Python slicing?

When I import an image from Matlab I get the following jumbled image rather than the (224x224x3 RGB) image of a single elephant I expected I write the image from Matlab as a binary file ...
0
votes
0answers
46 views

problem with the Gram-Schmidt method

To have the Gram-Schmidt method in Matlab, I use the following code: ...
0
votes
3answers
29 views

rectangular function in matlab

I am trying to program this function: $ g(t)= \operatorname{rect}(t/T) \,f(t)$ I take: $t=0:1:20$ and I know how to program $f(t)$. But I have a problem with the rectangular function. How to program ...
0
votes
1answer
25 views

How can I do QPSK in MATLAB [closed]

Could you please explain the step below, what is the benefit of it and how does it work. . I do qpsk demodulation, do I started doing the meshgrid, ...
0
votes
0answers
18 views

Correlation for arbitrary delays in MATLAB

The xcorr() function in MATLAB allows the calculation of correlations between 2 signals. The documentation states this can be limited from -maxlag to maxlag, however is there a way to limit this ...
0
votes
0answers
30 views

How can I oversample OFDM received signal in MATLAB

I need to oversample a received signal in OFDM by MATLAB, according to the below diagram, but when I oversample, I finally get the same number of samples however that should be double. !! The ...
0
votes
2answers
60 views

Orthogonal signals in frequency and time domains [closed]

I have 3 orthogonal signals obtained by Fourier transformation. But when I do the inverse Fourier transform in Matlab, my signals are no longer orthogonal in the time domain. Here is my question: ...
0
votes
0answers
19 views

Facing problem in plotting histogram of DCT coefficient of an image

In digital image forensic, it is assumed that the histogram of DCT coefficients of the un-compressed natural image has the smooth histogram. However, the histogram of DCT coefficients of the ...
0
votes
0answers
34 views

How can I get the channel response after FFT in OFDM receiver [closed]

I'm wondering if we can extract the channel in frequency domain in OFDM, in other words, is the below correct? Assuming we have the received signal Y convoluted with channel h in ofdm system as ...
0
votes
0answers
18 views

How to apply a homography matrix after finding it via a common camera calibration technique

I am trying to find a matrix that maps four specific 2D-points to another set of specific 2D-points. Specifically, I'm trying to find the matrix $H$, such that $x_i=HX_i$ achieves the following ...
1
vote
1answer
31 views

Seven term Blackman Harris window

I am currently trying to evaluate a high resolution ADC for which I need to window my output data for the FFT. Up until now I have been using the default 4 term Blackman harris window in MATLAB. ...
-1
votes
0answers
14 views

perform diffusion of image pixels

I have an image say I, I apply a transformation called Multi resolution Singular value decomposition on it. By this, I decompose the images into 4 parts. The first parts are the approximation part ...
1
vote
0answers
37 views

How can I manually find the coefficients, poles and zeros of Butterworth low pass filter in MATLAB instead of using the built-in functions?

Actually I need to filter a raw ECG signal using low pass Butterworth filter at 70 hertz. And j need to implement the Butterworth filter first for that. Please any help since I'm very new to this ...
0
votes
1answer
30 views

Arbitrary-Response Filter Design

I want to design a FIR filter by using 'cfirpm' function , which can i use the group delay and grid frequency, my code is : ...
2
votes
1answer
35 views

issue in DFT of OFDM by blocks and N-by-N

I'm trying to study and understand the OFDM, and during coding the OFDM in MATLAB, I faced this issue: suppose we have the Numsymbol = 256, and dataqpsk our used data, The issue which I face that ...
2
votes
1answer
132 views

Calculating SNR from Frequency Domain

As I am newbie to signals, I have collected an appliance signal in frequency domain as follows: (PSD- Power Spectral Density). So, I need to calculate the SNR (Signal to Noise Ratio) and BER (Bit ...
0
votes
1answer
75 views

sampling rate Matlab

I have a rather strange but i thin interesting question. The idea is to gain a better understanding of sampling rate vs frequency shifting when playing audio. The idea is a little experiment: ...
0
votes
0answers
40 views

Log difference measure

Referring to this research paper: Drum Source Separation using Percussive Feature Detection and Spectral Modulation. In section III Temporal Estimation, equation 2 is the log difference of the ...
1
vote
0answers
28 views

Simulating Phase Noise: How to do it?

I have a system that I am simulating, and I want to add phase noise to the process. I didn't know how to do it, so I have been conducting an literature review. I found a good reference with an "easy ...
-2
votes
0answers
14 views

Unexpected results using octaveFilter in Matlab

I'm aiming at obtaining a 1/3 octave band frequency signal for specific centre frequencies. I want to use Matlab's octaveFilter functionality but I was expecting to get a single 1/3 octave band peak ...
0
votes
1answer
25 views

PN code generation

Can we generate PN codes (maximal length sequence) using this technique in Matlab where L is the PN length? pn=2*(rand(1,L)>0.5)-1 If yes, why?
0
votes
0answers
12 views

Computing rotor blade segment angles and distances

I'm stuck at the moment and I suggest that I've made some flaws in developing a code. I'm trying to implement a function what computes the following angles and the distances (distance = observer to ...
0
votes
1answer
43 views

Question of Digital filter; stability and order

Below 1~6 are my question. Shortcomings of IIR filter. Mean of unstable. (Things that will happen when system is unstable.) How to select the best order(n). What happens when I raise order too much. ...
0
votes
0answers
37 views

Comparing Octave/Matlab FFT results against CPU FFT

I wrote a program which runs FFT from Intel MKL and am trying to compare its results with that of Octave, but things don't quite match. The program does: Populates a 1D array of, say, 1024 elements, ...
1
vote
2answers
51 views

How to compute the impulse response from incomplete frequency response data?

I need to compute the impulse response of a system, but I only have access to the frequency response data. This data contains the output magnitude of the system (for a fixed input amplitude) at ...
1
vote
0answers
18 views

DPCM Encoder and Decoder Simulation in MATLAB

I am trying to simulate DPCM in order to understand how it works. I am trying to implement the simplest version of DPCM which has a system scheme like in figure 1. Sorry for the quality of the ...
0
votes
0answers
21 views

2D to 3D back projection for height estimation mathematics error

I'm currently trying to implement the core of the second algorithm implemented in this paper (p5-8, p17-20) in matlab as a prototype for a larger project that requires object height detection. The ...
0
votes
0answers
46 views

Bandpass butterworth filter in python is not working

I've implemented this bandpass filter in matlab for the audio signals and it's working as expected. Now, I tried to implement the same thing in Python but it doesn't produced expected results, it just ...
1
vote
2answers
72 views

How to compute impulse and frequency response of Flanger?

I have to the implementation of a Flanger effect on Matlab, buy previously I have to plot its frequency response and impulse response. The difference equation is $y[n]=x[n]+a\cdot x[n-d[n]]$ where $a$...
1
vote
1answer
41 views

How can I get the polyphase components of a signal

My question, What is the polyhase components of the signal? What does mean a polyphase component for a signal? Is it true that example : ...
1
vote
2answers
86 views

Inverse DFT of $-i\pi \text{ sgn}(f)$

the following MATLAB code should plot the iFFT of $-i \pi sgn(f)$ which has to be $\frac{1}{t}$ in continuous time. As you can see, the output kinda looks like a 1/x function, but is modulated. How ...
0
votes
0answers
28 views

How to know whether numerical roundoff error or not in MATLAB?

This is result of real and imaginary parts of cos fft. I think e-13 number is numerical error but, I don't know how to know they are real numerical error. If I have to try change primitive types, ...
1
vote
2answers
38 views

How can I remove flickering background in a video?

I have a black and white video taken with a high speed camera and I notice a background flickering coming from my LED light. The images alternate from dim to bright and it makes the videos quite ...
0
votes
0answers
32 views

I get strange BER when I build a code of OFDM in MATLAB with multipath

I have built the code for OFDM using Multi-path channel, but when I plot the BER, I get it abnormal results . (please, any help) .. It's urgent please here is the code I made: ...
0
votes
0answers
84 views

Weird issues with 60 Hz noise filtering

EDITED: Look at the 'LAST PART' to see the time-domain effect: I am trying to evaluate the performance of a notch filter (for eliminating 60Hz noise) designed in Matlab. I am doing so by calculating ...
1
vote
3answers
44 views

Resample audio signal with a low factors

Currently, we need to handle a piece of an audio signal. We want to resample it with different factor rate (p/q) starting with 1.0002 to 0.9998 with a decrement of 0.000005. But Matlab function cannot ...
0
votes
1answer
40 views

reconstructing time-stretched signals for filtering purposes

I would like to know if it's possible to reconstruct the original time domain signal from it's time-stretched version? Is there any algorithm out there that can do this? Python, Matlab, etc? I want ...
0
votes
1answer
24 views

What unit is the z axis of a power spectrogram of audio?

the question might seem dumb but since I tried it out and got values well above 2000 (watts?) it got me thinking... Check this out: ...
0
votes
1answer
39 views

The Gradient Operator of a Vectorized Image in Matrix Form

I have this optimization problem: $$ \arg \min_{ X \left( i, j \right) } \sum_{i, j} \left\| X \left( i, j \right) - 255 \right\|_{2}^{2} + \lambda \sum_{i, j} \left\| \nabla X \left( i, j \right) - \...
-1
votes
1answer
31 views

Computationally elegant and robust way to find specific point within dataset

I would like to extract the x coordinates of the marked points with Matlab. The data is already normalized and smoothed (matlab fcn smoothdata(y, 'sgolay', 'Degree', 2, 'SamplePoints', x)). The ...
0
votes
0answers
51 views

GPS signal tracking

I have a complex input signal of 300 ms at baseband. I have already performed acquisition on this signal and acquired 4 GPS satellites and have the code phase and doppler frequency of each of them. ...
2
votes
0answers
79 views

Educational purpose: Steps of HOS algorithm for channel estimation

Based on the research articles FIR System Identification Using Third Order Cumulants and Blind Two Input and Two Output FIR Channel Based on frequency domain second order statistics, I am trying to ...
1
vote
1answer
73 views

How to perform this spectral decomposition in MATLAB?

Given a filter $X(z)$ I want to find $G(z)$ such that it is stable, causal and minimum-phase, and it accomplishes that $$X(z)=K_0G(z)G^*(1/z^*)$$ where $K_0\in\mathbb{R}$. Of course, $G^*(1/z^*)$ ...