signal-processing

Undefined function 'minus' for input argument of type 'iddata'

十年热恋 提交于 2019-12-12 21:19:24
问题 This is a followup to a previous issue I was having. I want to give an offset to a signal then add some delay in it and calculate RMSE for that but when taking difference I am having the following issue: I would like to ask the following things: How can I solve the above problem? Will anybody please explain in simple words what iddata does - because I have studied different portals including MATLAB but remained unable to get a good concept. How can I store data of type iddata in cell for

Designing a simple bandpass/bandstop filter in Matlab

[亡魂溺海] 提交于 2019-12-12 20:41:00
问题 For a homework assignment I have to design a simple bandpass filter in Matlab that filters out everything between 250Hz and 1000 Hz. What I did so far: - using the 'enframe' function to create half overlapping windows with 512 samples each. On the windows I apply the hann window function. - On each window I apply an fft. After this I reconstruct the original signal with the function ifft, that all goes well. But the problem is how I have to interpret the result of the fft function and how to

FIR filter in CUDA (as a 1D convolution)

旧城冷巷雨未停 提交于 2019-12-12 20:08:18
问题 I'm trying to implement a FIR (Finite Impulse Response) filter in CUDA. My approach is quite simple and looks somewhat like this: #include <cuda.h> __global__ void filterData(const float *d_data, const float *d_numerator, float *d_filteredData, const int numeratorLength, const int filteredDataLength) { int i = blockDim.x * blockIdx.x + threadIdx.x; float sum = 0.0f; if (i < filteredDataLength) { for (int j = 0; j < numeratorLength; j++) { // The first (numeratorLength-1) elements contain the

Accelerate Framework FFT vDSPztoc split real form to split real vector

别来无恙 提交于 2019-12-12 18:29:36
问题 I am implementing an accelerometer-based FFT in iOS using the Accelerate Framework, but the one thing that I'm still a bit confused about is this part: /* The output signal is now in a split real form. Use the function * vDSP_ztoc to get a split real vector. */ vDSP_ztoc(&A, 1, (COMPLEX *) obtainedReal, 2, nOver2); What does the final array look like? I'm confused as to the distinction between "split real form" and "split real vector". I might have some understanding of what it means, but I

How to determine the parameter alpha of a Complementary Filter?

拟墨画扇 提交于 2019-12-12 18:23:14
问题 I know that the Complementary Filter has the functions of both LPF and HPF. But I think my understanding on the principal behind it is still unclear. I am quite new on digital signal processing, and maybe some very fundamental explanations will help a lot. Say I have a Complementary Filter as follows: y = a * y + (1 - a) * x Then my parameter a may be calculated by a = time_constant / (time_constant + sample_period) , where the sample_period is simply the reciprocal of the sampling_frequency

order making for a matrix in matlab

我的未来我决定 提交于 2019-12-12 15:50:50
问题 I am doing a simulation on a matrix (suppose a 5x5 matrix). One of the elements of this matrix is known (the back square in below; this location will not be always in center) and I want to start from that location and spirally visit the other elements (I have shown the orders in number). How I can define this order in a large matrix (e.g. 1000x1000)? Because I cannot do it manually and I am looking for a more heuristic way. I used bwdist in matlab and then sort the obtained matrix, but the

Matlab fft function swapping indices

廉价感情. 提交于 2019-12-12 14:13:34
问题 I've written a simple and very small Matlab code that calculates the Discrete Fourier Transfrom of a given array (or vector). I worked it out manually and got an answer and my Matlab code also giving the same answer. But fft is giving an answer different from this by swapping indices. Here are the mannual calculations that I've done: This is the second image: This is the third image: From those calculations it is clear that my answer would be {12, -3-3j, -2, -3+3j} Here is the Matlab code

Smoothing Small Data Set With Second Order Quadratic Curve

▼魔方 西西 提交于 2019-12-12 12:34:57
问题 I'm doing some specific signal analysis, and I am in need of a method that would smooth out a given bell-shaped distribution curve. A running average approach isn't producing the results I desire. I want to keep the min/max, and general shape of my fitted curve intact, but resolve the inconsistencies in sampling. In short: if given a set of data that models a simple quadratic curve, what statistical smoothing method would you recommend? If possible, please reference an implementation, library

Applying low pass filter

五迷三道 提交于 2019-12-12 10:03:30
问题 I want to simulate an interpolator in MATLAB using upsampling followed by a low pass filter. First I have up-sampled my signal by introducing 0's. Now I want to apply a low pass filter in order to interpolate. I have designed the following filter: The filter is exactly 1/8 of the normalized frequency because I need to downsample afterward. (it's a specific excersise to upsample interpolate and downsample in this particular order.) However when I apply this filter to my data using the function

Generate 16 QAM signal

最后都变了- 提交于 2019-12-12 09:53:31
问题 I know the way to generate QPSK signals using the following TxS=round(rand(1,N))*2-1; % QPSK symbols are transmitted symbols TxS=TxS+sqrt(-1)*(round(rand(1,N))*2-1); In the above, the symbols are 2 alphabets +1/-1. But I cannot understand how to generate 16- Quadrature Amplitude Modulation signal for the same alphabet space? Is it possible? Or what is the usual way for generating ? Also, is it a practice to work with complex signals and not real ? 回答1: Take a look at this: http://www