signal-processing

Correct frequency axis using FFT

寵の児 提交于 2019-12-24 18:19:23
问题 How can I get the correct frequency vector to plot using the FFT of MATLAB ? My problem: N = 64; n = 0:N-1; phi1 = 2*(rand-0.5)*pi; omega1 = pi/6; phi2 = 2*(rand-0.5)*pi; omega2 = 5*pi/6; w = randn(1,N); % noise x = 2*exp(1i*(n*omega1+phi1))+4*sin(n*omega2+phi2); h = rectwin(N).'; x = x.*h; X = abs(fft(x)); Normally I'd do this : f = f = Fs/Nsamples*(0:Nsamples/2-1); % Prepare freq data for plot The problem is this time I do not have a Fs (sample frequency). How can I do it correctly in this

Is the system memory-less?

旧街凉风 提交于 2019-12-24 16:22:52
问题 I got a Question on digital signal processing. Is h(n)= (2 n+5)u(n) memory-less? I think that the because of u(n) , the system is memory-less. Am I right? 回答1: The short answer: No, assuming the provided h(n) represents the usual system impulse response. A memoryless system is characterized with outputs that do not depend on past inputs (and commonly also do not depend on future input). In terms of the impulse response it means that the response h(n) at a time n>0 should not depend on the

asterisk silence detection on connected call

不想你离开。 提交于 2019-12-24 15:03:40
问题 Sorry in advance if my question makes no sense to you. I am newbie in asterisk, and what I am trying to do is writing a dial plan which can connects 2 soft phone end point (VoIP client end points) and then try to detect silence in ongoing call. I am able to make through call by using following dial plan exten = 100, 1, Answer() same = 100, n, Monitor() same = 100, n, Dial(SIP/client1,15) when I dialed 100, it makes call to client1, which I received gracefully and now call is on going, now I

Removing Vocals from sound file in Matlab

不羁的心 提交于 2019-12-24 13:58:20
问题 I am separating left and right channels of sound files using Matlab. The code compiles but it is not removing the vocals completely from the sound file. Why is that? Here is the code: [y,fs]=wavread('On the floor.wav'); left=y(:,1); right=y(:,2); wavplay(left-right,fs); 回答1: Vocal suppression is a hard problem that is the subject of a great deal of academic and commercial research. In academia this kind of problem is called source separation and in recent years has been a popular doctoral

Increase data points in signal

帅比萌擦擦* 提交于 2019-12-24 12:59:14
问题 I have an input data set of 32 points. Now I want to convert these 32 points to 240 points by averaging the data over the points. I thought of plotting the 32 sample points which I have and then by approximately plotting the curve and taking data at a higher sampling frequency so as to obtain 240 points. I am not able to understand how to do this in MATLAB. I took help from some sources, but I was not able to come up with any solution. How can this be done? In short, I want to convert 'x'

CRC calculating and BCH encoding [THEORY]

冷暖自知 提交于 2019-12-24 10:42:36
问题 I have question about BCH Encoding. Is BCH Encoding is the same operation like CRC remainder calculation? M(x) mod G(x) = R(x) and R(x) is my BCH code? 回答1: You are pretty much correct. To be precise, if your generator polynomial is g(x) and your block size is n , then the valid code words are the multiples of g(x) with degree < n . Lets say you have a message m(x) of degree < k , and g(x) has degree n-k : There are different ways you could turn your message into a unique valid code word. m(x

How to calibrate an external microphone device?

三世轮回 提交于 2019-12-24 09:38:07
问题 I have been working on a research project which involves making audio recordings to perform some digital signal processing analysis. To aid me in my recording, my research supervisor has provided me with an i436 microphone. It looks like this. However, before making the recording he has asked me to calibrate the device. I have a rather blurry idea of what calibration means. Since different microphones may have different intensities / recording conditions, they will generate different results

Resampling of time signal in MATLAB

佐手、 提交于 2019-12-24 07:50:08
问题 I want to resample my signal with to new time. Currently the sampling time of my signal is 0.01s , and the size of my signal and time array is 1*90001 . I am trying to use resample(x,p,q) in MATLAB, but I am a little bit confused. Can somebody suggest the right way to use this function and how to resample my data to rate of 0.02s instead of 0.01s ? Code - this is how I am trying to use resample , with example data. t = [0:0.03:1]; x = sin(4*pi*t); y = resample(x, 1, 2); ty = resample(t,1,2);

How do I find a scale between two different audio samples?

旧城冷巷雨未停 提交于 2019-12-24 07:03:13
问题 I'm planning to make an universal application that analyses audio samples. When I say 'universal' I mean that any technology (Javascript, C, Java, etc) can use it. Basically I made an application on iOS, using Apple's AVFoundation, that receives on real time the microphone samples at a lenght of 512 (bufferSize = 512). At Python I made the same thing, using PyAudio, but unfortunately I received very different values... Look the samples: Samples of bufferSize = 512 on iOS: [0.0166742969, 0

R: Generate sine wave with variable frequency

巧了我就是萌 提交于 2019-12-24 06:32:07
问题 This might be more of a math question than an R question but here it goes... I'm trying to generate a low frequency oscillator (LFO2) where the frequency is controlled by another low frequency oscillator (LFO1). LFO1 has a frequency of 0.02 Hz while I want LFO2 to have a frequency that oscillates between 0.00 and 0.11 Hz dependent on the output of LFO1. # length in seconds track_length <- 356 upsample <- 10 # upsample the signal # LFO rates (Hz) rate1 <- 0.02 rate2_range <- list(0.00, 0.11) #