Answered

calculate snr of digital signal

This is not correct. The second input to snr must be a real-valued row or column vector that must have the same dimensions as th...

calculate snr of digital signal

This is not correct. The second input to snr must be a real-valued row or column vector that must have the same dimensions as th...

alrededor de 1 año ago | 0

Answered

DTMF decoder .wav files code

It's a problem with your window size. Like I mentioned in a previous iteration of this question, you can look detect a proper wi...

DTMF decoder .wav files code

It's a problem with your window size. Like I mentioned in a previous iteration of this question, you can look detect a proper wi...

alrededor de 1 año ago | 1

Answered

How do I generate a given Matrix in one command?

T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)

How do I generate a given Matrix in one command?

T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)

alrededor de 1 año ago | 0

Answered

How to plot data with very small differences

You can try using *stem* or *scatter* or playing the *axis* limits. Or just plot the residuals, which is a pretty standard thing...

How to plot data with very small differences

You can try using *stem* or *scatter* or playing the *axis* limits. Or just plot the residuals, which is a pretty standard thing...

alrededor de 1 año ago | 0

Answered

Two outputs when calculating standard error of mean, WHY?

It's because size(A) returns two outputs. If you want to use the size of A in a particular dimension, use size(A,dim). (Since |s...

Two outputs when calculating standard error of mean, WHY?

It's because size(A) returns two outputs. If you want to use the size of A in a particular dimension, use size(A,dim). (Since |s...

alrededor de 1 año ago | 0

| accepted

Answered

3d Plotting Using Meshgrid

Replace for i=1:1:length(n) for j=1:1:length(m) [X,Y]=meshgrid(i,j); %disp(f(X,Y)); mesh...

3d Plotting Using Meshgrid

Replace for i=1:1:length(n) for j=1:1:length(m) [X,Y]=meshgrid(i,j); %disp(f(X,Y)); mesh...

alrededor de 1 año ago | 1

| accepted

Answered

Switch the x axis direction where positive values are on the left side of the y axis

figure plot(1:10) set(gca,'XDir','reverse')

Switch the x axis direction where positive values are on the left side of the y axis

figure plot(1:10) set(gca,'XDir','reverse')

alrededor de 1 año ago | 0

Answered

how do I re-sample a continuous function; but maintain shape?

You can unaccept the answer if you want to keep it open, but also consider this answer. (For 3, I meant you're measuring from r...

how do I re-sample a continuous function; but maintain shape?

You can unaccept the answer if you want to keep it open, but also consider this answer. (For 3, I meant you're measuring from r...

alrededor de 1 año ago | 1

Answered

How do I organize repetitive values within a vector into a new vector that only has one of every repetitive value?

Your title and your description ask two very different questions. Your description is basically how to use XTick and XTickLabel ...

How do I organize repetitive values within a vector into a new vector that only has one of every repetitive value?

Your title and your description ask two very different questions. Your description is basically how to use XTick and XTickLabel ...

alrededor de 1 año ago | 1

Answered

Printing .m to pdf on Linux

publish('myscript.m','pdf'); It will publish any figure or anything that prints to the command line as well.

Printing .m to pdf on Linux

publish('myscript.m','pdf'); It will publish any figure or anything that prints to the command line as well.

alrededor de 1 año ago | 0

Answered

how do I re-sample a continuous function; but maintain shape?

I see several potential reasons why this is occuring. 1) There will be general broadening of the signal due to downsampling. 2...

how do I re-sample a continuous function; but maintain shape?

I see several potential reasons why this is occuring. 1) There will be general broadening of the signal due to downsampling. 2...

alrededor de 1 año ago | 1

| accepted

Answered

Random number, Random integer

x = 2:6; y = x(randperm(length(x),2));

Random number, Random integer

x = 2:6; y = x(randperm(length(x),2));

alrededor de 1 año ago | 1

| accepted

Answered

mscohere function (equations used for it)

You can view the code by typing into the command window open mscohere % then subsequently open welch and follow along. You c...

mscohere function (equations used for it)

You can view the code by typing into the command window open mscohere % then subsequently open welch and follow along. You c...

alrededor de 1 año ago | 1

Answered

improving result of FFT

You'll want to use it as the second input to the fft. This will affect your frequency vector |fvec| though. n = 2^nextpow2(...

improving result of FFT

You'll want to use it as the second input to the fft. This will affect your frequency vector |fvec| though. n = 2^nextpow2(...

alrededor de 1 año ago | 0

Answered

What can I know from the spectrogram of mp3 and wav file

It's difficult to say given that they are plotted with two different colorbar axes limits. Set them to be the same and you can v...

What can I know from the spectrogram of mp3 and wav file

It's difficult to say given that they are plotted with two different colorbar axes limits. Set them to be the same and you can v...

alrededor de 1 año ago | 0

Answered

FFT size. Determine K so that K is a power of two

If you sampling frequency is 4000 Hz, then to get a resolution of 20 Hz you need to take an N-point fft, where N = 4000/20 = 200...

FFT size. Determine K so that K is a power of two

If you sampling frequency is 4000 Hz, then to get a resolution of 20 Hz you need to take an N-point fft, where N = 4000/20 = 200...

alrededor de 1 año ago | 2

Answered

How to get rid of ringing/overshoot in an ecg signal while using notch filter?

clearvars clc close all fs = 500; ecg = xlsread('Noisy_50HZ_ECG.xlsx'); ecg = detrend(ecg.'); ecg = sgolayfilt(ecg,0,5...

How to get rid of ringing/overshoot in an ecg signal while using notch filter?

clearvars clc close all fs = 500; ecg = xlsread('Noisy_50HZ_ECG.xlsx'); ecg = detrend(ecg.'); ecg = sgolayfilt(ecg,0,5...

alrededor de 1 año ago | 1

| accepted

Answered

Multiple Summation of Series using For Loops (Magnetic Flux through Coil Simulation)

Hi Samuel, I don't see anything wrong with the code. The only thing I would change is to do the following outside the loops: ...

Multiple Summation of Series using For Loops (Magnetic Flux through Coil Simulation)

Hi Samuel, I don't see anything wrong with the code. The only thing I would change is to do the following outside the loops: ...

alrededor de 1 año ago | 1

| accepted

Answered

How to Take Inverse Fourier Transform?

You have essentially done this: Y1 = fftshift(fft(h38)); Y1 = abs(Y1); P1 = Y1; iP1 = ifft(P1); Of course iP...

How to Take Inverse Fourier Transform?

You have essentially done this: Y1 = fftshift(fft(h38)); Y1 = abs(Y1); P1 = Y1; iP1 = ifft(P1); Of course iP...

alrededor de 1 año ago | 0

| accepted

Answered

collapsing redundant entries in MATLAB table

Use |groupsummary|: <https://www.mathworks.com/help/matlab/ref/double.groupsummary.html>

collapsing redundant entries in MATLAB table

Use |groupsummary|: <https://www.mathworks.com/help/matlab/ref/double.groupsummary.html>

alrededor de 1 año ago | 1

| accepted

Answered

How to take gradient, curl or divergence of numeric vector fields?

You can use the |curl| and |divergence| functions which are not in the symbolic toolbox: <https://www.mathworks.com/help/matl...

How to take gradient, curl or divergence of numeric vector fields?

You can use the |curl| and |divergence| functions which are not in the symbolic toolbox: <https://www.mathworks.com/help/matl...

alrededor de 1 año ago | 0

Answered

Random number multiple of 5 generation

First find out how many possibilities there are: interMin = 20; interMax = 150; n = sum(~mod(interMin:interMax,5)); % n = 27...

Random number multiple of 5 generation

First find out how many possibilities there are: interMin = 20; interMax = 150; n = sum(~mod(interMin:interMax,5)); % n = 27...

alrededor de 1 año ago | 0

Answered

Why won't my graph plot?

It did plot. Try this: plot(FS,d,'bo') It's just that FS and d only contain 1 element. You need to understand how to store da...

Why won't my graph plot?

It did plot. Try this: plot(FS,d,'bo') It's just that FS and d only contain 1 element. You need to understand how to store da...

alrededor de 1 año ago | 0

Answered

How would you approach this problem?

I don't understand the second truth table, but the first one can be done as follows: actual = [0;0;1;1]; next = [0;1;0;1]; ...

How would you approach this problem?

I don't understand the second truth table, but the first one can be done as follows: actual = [0;0;1;1]; next = [0;1;0;1]; ...

alrededor de 1 año ago | 1

| accepted

Answered

How can I combine complex spectrogram results as an image for multi-channel EEG signal?

It usually takes a lot of work to get a figure to look just right. Here is what I came up with quickly, you can play around with...

How can I combine complex spectrogram results as an image for multi-channel EEG signal?

It usually takes a lot of work to get a figure to look just right. Here is what I came up with quickly, you can play around with...

alrededor de 1 año ago | 2

Answered

How can I combine complex spectrogram results as an image for multi-channel EEG signal?

Take all your outputs from spectrogram, and assuming they are all sampled at the same time/freqs, just stack them (concatenate) ...

How can I combine complex spectrogram results as an image for multi-channel EEG signal?

Take all your outputs from spectrogram, and assuming they are all sampled at the same time/freqs, just stack them (concatenate) ...

alrededor de 1 año ago | 2

Answered

How to use the result of my matrix calculation to create 2D plot

l1,l2, and Z are all a single value. You need to understand how to store values in a for loop: https://www.mathworks.com/help/m...

How to use the result of my matrix calculation to create 2D plot

l1,l2, and Z are all a single value. You need to understand how to store values in a for loop: https://www.mathworks.com/help/m...

alrededor de 1 año ago | 0

| accepted

Answered

time domain and frequency domain

Code looks fine to me. Not sure what you mean by N being 2^N. The only thing I would tweak is setting tvec = (0:N-1)*delt; As...

time domain and frequency domain

Code looks fine to me. Not sure what you mean by N being 2^N. The only thing I would tweak is setting tvec = (0:N-1)*delt; As...

alrededor de 1 año ago | 0

Answered

extract data with unique ID

As Walter also suggested: [~,~,locGroups] = unique(subs(:,1)); % also look at [~,~,locGroups] = unique(subs(:,1),'stable'); ...

extract data with unique ID

As Walter also suggested: [~,~,locGroups] = unique(subs(:,1)); % also look at [~,~,locGroups] = unique(subs(:,1),'stable'); ...

alrededor de 1 año ago | 0

| accepted

Answered

how to handle this issue "Error using regexprep"

% Assuming this is what you have... labels = {{["usm1" ]} ,{["usm2" ]},{["usm3" ]},{["usm4" ]},... {["owrl1"]},{["owrl2"]}...

how to handle this issue "Error using regexprep"

% Assuming this is what you have... labels = {{["usm1" ]} ,{["usm2" ]},{["usm3" ]},{["usm4" ]},... {["owrl1"]},{["owrl2"]}...

alrededor de 1 año ago | 0

| accepted