Respondida
FIR Parks-McClellan
You don't want to use spectrogram, use freqz() freqz(FR_SV,1) If you know the sampling frequency, you can input that as ...

alrededor de 14 años hace | 0

Respondida
Code for CorrCoef without using inbuilt function
The code for corrcoef is open for you to look at. Can't you use that as a basis for your implementation?

alrededor de 14 años hace | 0

Respondida
align created random numbers in an array
Y = [0.3, 0.7, 0.8]; U = [0.1 0.2]; Y = cat(2,Y,U); or just Y = [Y,U]; So for example: N = [3 4 5]; ...

alrededor de 14 años hace | 1

| aceptada

Respondida
trying to find peaks on a time series
Then please compare: x = [2 12 4 6 9 4 3 1 19 7]; [pks,locs] = findpeaks(x); % here is your code newx=zeros(lengt...

alrededor de 14 años hace | 0

Respondida
Wrong amplitude values after the FFT
The main issue you have is that you are only randomly sampling from a small set of frequencies and you are doing that 18 times, ...

alrededor de 14 años hace | 0

| aceptada

Respondida
trying to find peaks on a time series
I'm assuming that xn in your loop above is the signal. You don't show us where xn comes from and it's not used in your call to f...

alrededor de 14 años hace | 0

| aceptada

Respondida
Measure the degree of Periodicity
You can use the cepstrum. There is a technique called "cepstral peak prominence" that is used to analyze voice quality. The basi...

alrededor de 14 años hace | 1

Respondida
plot autocorrelation
x = randn(1000,1); % 1000 Gaussian deviates ~ N(0,1) y = filter([1 -1 1],1,x); % Create an MA(2) proce...

alrededor de 14 años hace | 5

| aceptada

Respondida
Xcorr - plot correlation across time.
t = 0:0.001:1-0.001; x = cos(2*pi*100*t)+randn(size(t)); y = sin(2*pi*100*t)+randn(size(t)); [xc,lags] = xcorr(x,...

alrededor de 14 años hace | 0

| aceptada

Respondida
How to extract a string name from a cell array and use it as name for a new variable?
Are you sure you want them to input the temperature as a string? A={'wind force', 'temperature', 'humidity'}; temp...

alrededor de 14 años hace | 0

Respondida
SNR in AWGN
With the syntax y = awgn(x,snr); You generate a white noise vector with a variance of variance = 10^(-snr/10); ...

alrededor de 14 años hace | 3

Respondida
Confused about num2str function
Hi, here is an example: for nn = 1:10, plot(randn(100,1)); title(['plot' num2str(nn)]); pause(0.5); end

alrededor de 14 años hace | 0

| aceptada

Respondida
multiple periodograms
Just do [Pxx2,w] = pwelch(y2); Or any legal variable name. MATLAB variable names must start with a letter followed by ...

alrededor de 14 años hace | 0

| aceptada

Respondida
no degree symbol
plot(randn(100,1)); title('360^\circ')

alrededor de 14 años hace | 0

Respondida
Finding x for when y equals a certain value
Say x is your x-vector, and I'll let y be your pressure readings, would the following work? I'll make the threshold 2 in this ex...

alrededor de 14 años hace | 1

| aceptada

Respondida
How to Compare the lengths of vectors
Not sure why you want to pad the DFT in this case, you end up not getting accurate frequency estimates by doing that. Fs = ...

alrededor de 14 años hace | 0

Respondida
Error with atan?
As Walter states in his comment, I'm guessing you should use atan2() so you can tell the difference between (1,-1) and (-1,1) ...

alrededor de 14 años hace | 1

Respondida
Matrix Filling
index = find(A(1,:) == 14); A = cat(1,A,zeros(1,size(A,2))); A(2,index) = 14; Added after Sean's point -- if the integer...

alrededor de 14 años hace | 0

| aceptada

Respondida
error in thresholding
soft thresholding shouldn't change the total number of coefficients. What soft thresholding will do is to change the value of th...

alrededor de 14 años hace | 0

Respondida
matrix indexing and creating a new matrix with new size
How about clear output For f = 1:nfiles IndexStart= RHs(RHs<peak); IndexEnd= RHs(RHs>peak); output{f} =...

alrededor de 14 años hace | 0

| aceptada

Respondida
matrix indexing and creating a new matrix with new size
How about using a cell array? Beyond that I think you will need to give us a little MATLAB example to illustrate your issue.

alrededor de 14 años hace | 0

Respondida
How to draw a discontinue function
t = 0:0.01:2*pi; x = cos(t); y = x; y(abs(x)>0.5) = 0.5; % to see the discontinuity stem(t(1:400),y(1:400)) ...

alrededor de 14 años hace | 0

| aceptada

Respondida
Hi everybody, I have a question about coherence and mscohere function
The key thing for you is to choose a window length that allows you to ensure that your frequencies of interest fall directly on ...

alrededor de 14 años hace | 0

| aceptada

Respondida
variable usage in function tf
Yes, the user will have to input some numeric value for K K = input('Enter your coefficient\n'); num = [K 1]; den ...

alrededor de 14 años hace | 0

Respondida
How to get the row number of a row vector in a matrix
You can find the row with A =[ 1 1 2 2 2 3 3 3 4 3 ...

alrededor de 14 años hace | 2

| aceptada

Respondida
p value of f test
If you use >>format long and display the p-value does it still say 0? What is your F value and what are the numerator ...

alrededor de 14 años hace | 0

Respondida
Convert Time Domain Signal Data into Frequency Domain, How to handle the imaginary terms?
Then you are telling me that b = [42007935 111212895 184546560 238219725 238219725 184546560 111212895 42007935]; %...

alrededor de 14 años hace | 2

Respondida
Convert Time Domain Signal Data into Frequency Domain, How to handle the imaginary terms?
Then you want to use freqz() b = [3.91719822748777E-02, 0.103629842929331, 0.171922134825388, 0.221...

alrededor de 14 años hace | 2

Respondida
How do i add normal error to some ideal values ?
Assume x is your error-free data x = cos(pi/4*(0:99)); % now add the error, let the standard deviation be 2 x =...

alrededor de 14 años hace | 1

| aceptada

Respondida
Convert Time Domain Signal Data into Frequency Domain, How to handle the imaginary terms?
You want to plot the magnitude and phase separately for the complex-valued data. Think of the polar form of a complex number. A ...

alrededor de 14 años hace | 3

| aceptada

Cargar más