signal-processing

How to change value of a signal's range in Matlab

帅比萌擦擦* 提交于 2019-12-11 07:59:38
问题 Let's say that I have a signal in Matlab like this x = cos(2*pi*10*t) + cos(2*pi*20*t) + cos(2*pi*50*t); And I want to change the values between 20 and 30 hz into 0. How can I do that? I mean, those values generated from the x formula, I want to change them a little bit. 回答1: You can do it by performing FFT over x and setting to zero those values that are between 20 and 30 Hz then applying the FFT inverse on the previous values and you should get the signal without those frequencies. However,

Create an Audio Graphic Equalizer for Windows

雨燕双飞 提交于 2019-12-11 07:38:14
问题 I need to create an audio graphic equalizer with the commonly used presets , for an application in Windows. I need to apply the equalization effects globally across all applications in Windows (ex DFX audio enhancer v11.1 applies effects at system level). Currently I can get to the frames of the system audio using sAPO samples provided by Microsoft. But I need to apply graphic equalization to this. Does Microsoft provides any API or Sample code for creating graphic equalizer in Windows?

Using imtophat in MATLAB

爱⌒轻易说出口 提交于 2019-12-11 07:24:18
问题 I'm trying to do top hat filtering in MATLAB. The imtophat function looks promising, but I have no idea how to use it. I don't have a lot of work with MATLAB before. I am trying to look find basically small spots several pixels wide that are local maxima in my 2 dimensional array. 回答1: I think you have more problem undertanding how to use STREL, than IMTOPHAT. The later can be described as simple threshold but per structural element, not the whole image. Here is another good examples of using

find Pitch-synchronous windowing based on pitch tracking

*爱你&永不变心* 提交于 2019-12-11 07:24:06
问题 As seen in comment link a pitch by Talkin’s Robust Algorithm for Pitch Tracking in voicebox (function name is "fxrapt") is extracted. http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/doc/voicebox/fxrapt.html However, I need to find pitch pulses in the LP error signal by detecting the maximum amplitude within each pitch period. For each pitch pulse, a Hamming window of two pitch periods long. if T(i-1), T(i), T(i+1) denote the locations of three successive pitch pulses. How can I design a analysis

Accelerate framework vDSP, FFT framing

懵懂的女人 提交于 2019-12-11 07:15:52
问题 I'm trying to implement FFT calculation, using Apple's vDSP, on a recorded audio file (let's assume it's a mono PCM). I've did a research here and I've found following topics quite useful: Using the apple FFT and accelerate Framework Extracting precise frequencies from FFT Bins using phase change between frames Reading audio with Extended Audio File Services (ExtAudioFileRead) For example, we configured FFT with frame_size N = 1024 samples, log2n=10: m_setupReal = vDSP_create_fftsetup(LOG_2N,

Add random noise with specific SNR to a signal

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:34:11
问题 I have randomly generated signal for example: %frequency f1 = 1000; f2 = 2000; Fs = 8000; %sampling frequency %amplitudes amp1 = 0.75; amp2 = 0.2; %time dt = 1/Fs stopTime = 0.3; t = 0:dt:stopTime; %random noise noise = randn(1,length(t)) %generated signal Signal = amp1*sin(2*pi*f1*t) + amp2*sin(2*pi*f1*t) + noise; Now i need to create two Signals S1, S2 with random noise with specific SNR. Noise added to S1 must be uncorrelated with noise added to S2 Here is what i tried: %SNR in dB SNR = [

Access data in different files stored in different folders

不羁岁月 提交于 2019-12-11 06:26:36
问题 I've searched around and found some potential solutions for my problem but have been unable to implement the code. Essentially, I have one directory with 32 sub-folders . Each of the 32 sub-folders has 4 files inside (.mat with 1 row and a few million columns each). My variable of interest is called data (see bellow in code). I need to access all 4 .mat files inside a subset of the sub-folders and append/concatenate them into a single big matrix . More, every group of 4 files in every sub

Resample a pandas dataframe by an arbitrary factor

一曲冷凌霜 提交于 2019-12-11 05:08:14
问题 Pandas resampling is really convenient if your indices use datetime indexing, but I haven't found an easy implementation to resample by an arbitrary factor. E.g., just treat each index as an arbitrary index, and resample the dataframe so that its resulting length is 4X shorter (and being more intelligent about it than just taking every 4th datapoint). This would be useful for anyone that's working with data that operates on a much shorter timescale than datetimes. For example, in my case I

Signal analysis: amplitude estimation in MATLAB

纵然是瞬间 提交于 2019-12-11 04:57:26
问题 I am trying to estimate the amplitude of a signal in MATLAB: As can be seen, I can't simply take the max() and min() to get the amplitude. The signal continually wanders, and in any case isn't constant. However, all that I'm looking for is an average - one single figure that estimates the average amplitude of the dominant component in the figure above (which repeats eight times). Visually, it's fairly obvious what I'm trying to find out. Programatically however... I have heard tell of

Counting data points within limits, and applying buffer to isolated points [data analysis]

≡放荡痞女 提交于 2019-12-11 04:40:34
问题 I am stuck trying to solve this problem: I have a set of data points, that correspond to a set of time values. i.e. values =[1,2,3,4,5,6,7,8,4] times = [0.1,0.2,0.3,0.4]... and so on, it's a sample rate of 10hz. I need to find the time spent between two limits. so for example if my limits are 3 and 5 inclusive then 3,4,5,4 are in my limits. if I calculate the time as number of ( points -1) /sample rate , or the start time and end time of the grouping, I will miss out the isolated data point