Réponse apportée
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 ...

environ 14 ans il y a | 0

Réponse apportée
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?

environ 14 ans il y a | 0

Réponse apportée
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]; ...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
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, ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 1

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

environ 14 ans il y a | 5

| A accepté

Réponse apportée
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,...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

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

environ 14 ans il y a | 3

Réponse apportée
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

environ 14 ans il y a | 0

| A accepté

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

environ 14 ans il y a | 0

| A accepté

Réponse apportée
no degree symbol
plot(randn(100,1)); title('360^\circ')

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
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 = ...

environ 14 ans il y a | 0

Réponse apportée
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) ...

environ 14 ans il y a | 1

Réponse apportée
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...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
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} =...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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.

environ 14 ans il y a | 0

Réponse apportée
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)) ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 14 ans il y a | 0

Réponse apportée
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 ...

environ 14 ans il y a | 2

| A accepté

Réponse apportée
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 ...

environ 14 ans il y a | 0

Réponse apportée
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]; %...

environ 14 ans il y a | 2

Réponse apportée
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...

environ 14 ans il y a | 2

Réponse apportée
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 =...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 14 ans il y a | 3

| A accepté

Charger plus