Answered

Gaussian fit to xy data and extracting FWHM

This is because of the slightly different way cftool has defined the gaussian equation for the fit, and it ends up multipling th...

Gaussian fit to xy data and extracting FWHM

This is because of the slightly different way cftool has defined the gaussian equation for the fit, and it ends up multipling th...

10 days ago | 1

| accepted

Answered

notch filter to remove 50Hz fundamental frequency and its second (100 Hz) and third (150Hz) harmonics. with using filter(),

'ecg' is the name of a function in the example: MATLAB/Examples/R2019a/dsp/FindHeartRateUsingPeakFinderPanelWithECGInputSignalE...

notch filter to remove 50Hz fundamental frequency and its second (100 Hz) and third (150Hz) harmonics. with using filter(),

'ecg' is the name of a function in the example: MATLAB/Examples/R2019a/dsp/FindHeartRateUsingPeakFinderPanelWithECGInputSignalE...

1 month ago | 0

Answered

cross correlation between complicated signals problem to measure delay between them

You can use the following code to get the time delay between two signals: clearvars close all clc [y1,fs1] = audioread('im...

cross correlation between complicated signals problem to measure delay between them

You can use the following code to get the time delay between two signals: clearvars close all clc [y1,fs1] = audioread('im...

2 months ago | 1

| accepted

Answered

How do you design your ECG bandpass?

Hi Stephan, here is a script that creates some filters and view them. You may often find that creating filters using the transfe...

How do you design your ECG bandpass?

Hi Stephan, here is a script that creates some filters and view them. You may often find that creating filters using the transfe...

2 months ago | 0

| accepted

Answered

How to remove specific colour from "surf" plot?

I don't have this dscatter function, but here is an example of how to do this with imagesc (which is similar enough that you cou...

How to remove specific colour from "surf" plot?

I don't have this dscatter function, but here is an example of how to do this with imagesc (which is similar enough that you cou...

2 months ago | 1

| accepted

Answered

Phase lag between two signals

Here's what I came up with using xcorr. It calculates that Signal 2 lags behind Signal 1 by 179.6 degrees. clearvars close al...

Phase lag between two signals

Here's what I came up with using xcorr. It calculates that Signal 2 lags behind Signal 1 by 179.6 degrees. clearvars close al...

2 months ago | 1

| accepted

Answered

I generated a FFT Signal of sampling frequency 1kHz for 65536 column vectors of a time domain signal. I want to apply segmentation on this FFT signal to 1024 parts before applying feature extraction.

fs = 1000; t = 0:1/fs:65.536-1/fs; x = sin(2*pi*50*t); X = fft(x); X_1024 = reshape(X,1024,[]); % X_1024 --> [1024x64]

I generated a FFT Signal of sampling frequency 1kHz for 65536 column vectors of a time domain signal. I want to apply segmentation on this FFT signal to 1024 parts before applying feature extraction.

fs = 1000; t = 0:1/fs:65.536-1/fs; x = sin(2*pi*50*t); X = fft(x); X_1024 = reshape(X,1024,[]); % X_1024 --> [1024x64]

2 months ago | 0

Answered

How can I apply median filter with sliding window for the ECG signal?

The second input of the function medfilt1 determines the window size. % Y = MEDFILT1(X,N) specifies the order, N, of the med...

How can I apply median filter with sliding window for the ECG signal?

The second input of the function medfilt1 determines the window size. % Y = MEDFILT1(X,N) specifies the order, N, of the med...

2 months ago | 1

Answered

extraction phase from ordertrack

To get the instantaneous phase of a signal x, xh = hilbert(x); xphase = angle(xh);

extraction phase from ordertrack

To get the instantaneous phase of a signal x, xh = hilbert(x); xphase = angle(xh);

2 months ago | 0

Answered

How to remove noise from the signal and identify the peaks for each cycle of the total signal

Your data has too many artifacts to allow easy processing. You would first need to visually/manually go through your data and se...

How to remove noise from the signal and identify the peaks for each cycle of the total signal

Your data has too many artifacts to allow easy processing. You would first need to visually/manually go through your data and se...

2 months ago | 1

| accepted

Answered

Performing RMS on a EEG singal

You will have to download a tool that can read EDF files. You can search the File Exchange for this, or use the Fieldtrip or EEG...

Performing RMS on a EEG singal

You will have to download a tool that can read EDF files. You can search the File Exchange for this, or use the Fieldtrip or EEG...

2 months ago | 0

Answered

Help with Chirp FFT

You are plotting the incorrect frequency vector. fft() does not return the frequencies in order from most negative to most posit...

Help with Chirp FFT

You are plotting the incorrect frequency vector. fft() does not return the frequencies in order from most negative to most posit...

2 months ago | 0

Answered

Reduce data points from 200 to 108

Do you want to: truncate your signal? downsample or resample interpolate something else? Truncate example: t = 1:200; x ...

Reduce data points from 200 to 108

Do you want to: truncate your signal? downsample or resample interpolate something else? Truncate example: t = 1:200; x ...

2 months ago | 0

Answered

How do you find average power?

Calculating the average power of your discrete signal according to the equation in your attached figure is done as: P = su...

How do you find average power?

Calculating the average power of your discrete signal according to the equation in your attached figure is done as: P = su...

2 months ago | 0

| accepted

Answered

how to contaminate ecg signal with noise

I obviously cannot run this code because I don't have the data nor any of the associated functions. By the way, you are getting ...

how to contaminate ecg signal with noise

I obviously cannot run this code because I don't have the data nor any of the associated functions. By the way, you are getting ...

2 months ago | 0

Answered

non linearity of sensor

In the figure I don't see a different value for B. I see a phase shift (C is close to but less than pi/4) and decreased amplitud...

non linearity of sensor

In the figure I don't see a different value for B. I see a phase shift (C is close to but less than pi/4) and decreased amplitud...

2 months ago | 0

Answered

Different plot shape for fft depending on time sample spacing

Your code is incomplete so I can barely comment on it. If you have trouble understanding it, you should look up the examples fro...

Different plot shape for fft depending on time sample spacing

Your code is incomplete so I can barely comment on it. If you have trouble understanding it, you should look up the examples fro...

2 months ago | 1

Answered

i cannot find the minimum values for matrix.

You must have overwritten 'min' as a variable, and doing min(T) is trying to index into a variable at non-integer positions. Tha...

i cannot find the minimum values for matrix.

You must have overwritten 'min' as a variable, and doing min(T) is trying to index into a variable at non-integer positions. Tha...

2 months ago | 2

Answered

Accessing field data in nonscalar structure array

Here is a solution. You'll have to write the functions differently for gathering cells and arrays. fun = @(s,field) {s.(field)}...

Accessing field data in nonscalar structure array

Here is a solution. You'll have to write the functions differently for gathering cells and arrays. fun = @(s,field) {s.(field)}...

2 months ago | 1

| accepted

Answered

Taking means of initial values in individual cells of structure

tracks.A = [{1:6};{10:14}]; Int2 = cellfun(@(x) mean(x(1:3)), tracks.A); % ans = [2; 11]; If instead you have a n...

Taking means of initial values in individual cells of structure

tracks.A = [{1:6};{10:14}]; Int2 = cellfun(@(x) mean(x(1:3)), tracks.A); % ans = [2; 11]; If instead you have a n...

2 months ago | 1

| accepted

Answered

reduce the sampling frequency of an ecg noise signal from 360hz to 250hz ..

help resample

reduce the sampling frequency of an ecg noise signal from 360hz to 250hz ..

help resample

2 months ago | 0

Answered

how to speed my code up

Why do you need a loop to compute a sum? Just replace the entire function with utilization = sum(myArray(periodNumber, 1:co...

how to speed my code up

Why do you need a loop to compute a sum? Just replace the entire function with utilization = sum(myArray(periodNumber, 1:co...

2 months ago | 1

| accepted

Answered

Matrix dimensions must agree Error

A is [8x8] and B is [8x1]. Do you mean to do the |mrdivide| operation, "/"? Or do you mean to do element-wise division "./"? If ...

Matrix dimensions must agree Error

A is [8x8] and B is [8x1]. Do you mean to do the |mrdivide| operation, "/"? Or do you mean to do element-wise division "./"? If ...

2 months ago | 0

Answered

When loading .mat files in a parfor, the first time is way slower than the second time.

So you're doing something like this? for k = 1:10 mydata = load('myfile.mat'); output = someFunction(mydata); end T...

When loading .mat files in a parfor, the first time is way slower than the second time.

So you're doing something like this? for k = 1:10 mydata = load('myfile.mat'); output = someFunction(mydata); end T...

2 months ago | 0

Answered

How do I remove the brackets from the numeric values around the zeros, so that only the numeric values are left and I am able to use boolean logic to get a solution ( 1 or 0)?

Hmm, seems like this was an opportunity to apply what you learned yesterday regarding regexprep, if you're trying to remove/repl...

How do I remove the brackets from the numeric values around the zeros, so that only the numeric values are left and I am able to use boolean logic to get a solution ( 1 or 0)?

Hmm, seems like this was an opportunity to apply what you learned yesterday regarding regexprep, if you're trying to remove/repl...

2 months ago | 1

| accepted

Answered

how can I improve this code???!!!

You should try preallocating margin before the loop. You have only set the value to one element, of zero. Since it's not clear h...

how can I improve this code???!!!

You should try preallocating margin before the loop. You have only set the value to one element, of zero. Since it's not clear h...

2 months ago | 2

| accepted

Answered

Finding series/pattern in an array

If you have the signal processing toolbox you can do this pretty easily using the functions risetime and pulsewidth. You just ha...

Finding series/pattern in an array

If you have the signal processing toolbox you can do this pretty easily using the functions risetime and pulsewidth. You just ha...

2 months ago | 0

Answered

Asking the error of 'Out of memory'

You are trying to allocate memory to a matrix for more memory than is available in your RAM. The solution completely depends upo...

Asking the error of 'Out of memory'

You are trying to allocate memory to a matrix for more memory than is available in your RAM. The solution completely depends upo...

2 months ago | 1

Answered

how to plot quiver evenly along lines?

I just took a closer look and it is what I suspected. In your loop over NL1 you are only storing the outputs, D1 and D2, for the...

how to plot quiver evenly along lines?

I just took a closer look and it is what I suspected. In your loop over NL1 you are only storing the outputs, D1 and D2, for the...

2 months ago | 1

Answered

Linspace with varying increment

MATLAB provides functions that do basic things, like create linearly spaced vectors using the colon operator or linspace. It is ...

Linspace with varying increment

MATLAB provides functions that do basic things, like create linearly spaced vectors using the colon operator or linspace. It is ...

2 months ago | 1

| accepted