Engineer - mechanices /ekectronics / signal processing

Average matlab user for 20 years now.

Professional Interests: signal processing, adaptive control, noise and vibration processing

Answered

Automatically select and name variables from import file (.xlsx)

ok so that's my first trial , based on slope values (must be below a given threshold to select sections of interest) not sure ...

Automatically select and name variables from import file (.xlsx)

ok so that's my first trial , based on slope values (must be below a given threshold to select sections of interest) not sure ...

1 day ago | 0

| accepted

Answered

I-PD Controller

hello Chiara I tried to fix this issue and got to this solution (attached) To me and according to the documentation of the 2D...

I-PD Controller

hello Chiara I tried to fix this issue and got to this solution (attached) To me and according to the documentation of the 2D...

1 day ago | 0

Answered

How to assign time on x-axis in emd?

hello if you know your sampling frequency (Fs) of the original data , and the length of the data , it's fairly straithforward ...

How to assign time on x-axis in emd?

hello if you know your sampling frequency (Fs) of the original data , and the length of the data , it's fairly straithforward ...

3 days ago | 0

Answered

time domain and frequency domain plot

hello see example to do averaged fft and spectrogram hope it helps

time domain and frequency domain plot

hello see example to do averaged fft and spectrogram hope it helps

3 days ago | 0

Answered

How to import a sequence of file .txt

hello Marco see below an example how to read all txt files inside a folder and do the batch processing - like here I simply do...

How to import a sequence of file .txt

hello Marco see below an example how to read all txt files inside a folder and do the batch processing - like here I simply do...

3 days ago | 1

Answered

Adding a sound wave to a wav file

hello if the two have same sampling frequency, you can add them together like z = wav1 + wav2; but make sure that the output...

Adding a sound wave to a wav file

hello if the two have same sampling frequency, you can add them together like z = wav1 + wav2; but make sure that the output...

7 days ago | 0

Answered

to delete specific lines/text from a .txt file

hello see below my code and it's output (txt file attached) clc clearvars Filename = 'data.txt'; result = extract_da...

to delete specific lines/text from a .txt file

hello see below my code and it's output (txt file attached) clc clearvars Filename = 'data.txt'; result = extract_da...

7 days ago | 0

Answered

Create Moving Average filter WITHOUT filter() function

hello try this fs = 200; %sampling frequency Ts = 1/200; %sampling time t = 0:Ts:1; x = sin(2*pi*2*t) + sin(2*pi*10*t) ...

Create Moving Average filter WITHOUT filter() function

hello try this fs = 200; %sampling frequency Ts = 1/200; %sampling time t = 0:Ts:1; x = sin(2*pi*2*t) + sin(2*pi*10*t) ...

8 days ago | 0

| accepted

Answered

How do I pass the signal to the frequency domain?

hello see below a code to do spectral analysis (example) but to me you're confusing fft with histogram. The fft spectrum will...

How do I pass the signal to the frequency domain?

hello see below a code to do spectral analysis (example) but to me you're confusing fft with histogram. The fft spectrum will...

10 days ago | 0

Answered

Trying to plot specific values from a vector

hello this is my suggestion - I put the equations in a sub function to make it easy after to do a for loop for multiple To4 va...

Trying to plot specific values from a vector

hello this is my suggestion - I put the equations in a sub function to make it easy after to do a for loop for multiple To4 va...

10 days ago | 0

| accepted

Answered

Residual vs Iteration Plot

hello code fixed : L = 0.05; T_w = 5; T...

Residual vs Iteration Plot

hello code fixed : L = 0.05; T_w = 5; T...

10 days ago | 0

| accepted

Answered

Select Data Column With Header are not in the first row

hello see below example : opts = detectImportOptions("Document1.txt","NumHeaderLines",12); opts.SelectedVari...

Select Data Column With Header are not in the first row

hello see below example : opts = detectImportOptions("Document1.txt","NumHeaderLines",12); opts.SelectedVari...

10 days ago | 0

| accepted

Answered

Quick question regarding CSV file reading.

hello my quick suggestion to the quick question fid=fopen('cycle1.csv'); e=textscan(fid,'%s','headerlines',1); e_splitted ...

Quick question regarding CSV file reading.

hello my quick suggestion to the quick question fid=fopen('cycle1.csv'); e=textscan(fid,'%s','headerlines',1); e_splitted ...

10 days ago | 0

| accepted

Answered

How to sum two data sets to get a best match of another data set?

hello see demo below : I added some noise on y3 to see the robustness of fminsearch got the results : a = 3.0379 b =...

How to sum two data sets to get a best match of another data set?

hello see demo below : I added some noise on y3 to see the robustness of fminsearch got the results : a = 3.0379 b =...

11 days ago | 0

| accepted

Answered

Why this code gives error?

hello it works better this way : plot(f,20*log10(FFT_abs/max(FFT_abs)),'b+-','linewidth',3);

Why this code gives error?

hello it works better this way : plot(f,20*log10(FFT_abs/max(FFT_abs)),'b+-','linewidth',3);

11 days ago | 0

Answered

FFT Function not working with multiple columns

hello first , xlsread is a bit outdated , use importdata instead second, here's a generic code for time and frequency analysi...

FFT Function not working with multiple columns

hello first , xlsread is a bit outdated , use importdata instead second, here's a generic code for time and frequency analysi...

13 days ago | 1

| accepted

Answered

How to get a velocity graph from recorded displacements and times?

hello to get velocity , you need the first derivative of the displacement, for acceleration, it's the second derivative exa...

How to get a velocity graph from recorded displacements and times?

hello to get velocity , you need the first derivative of the displacement, for acceleration, it's the second derivative exa...

13 days ago | 0

Answered

I have a time series signal which is needed in the frequency domain

hello maybe this can be starting point further refinement would be to have the frequency axis of the spectrogram in log scal...

I have a time series signal which is needed in the frequency domain

hello maybe this can be starting point further refinement would be to have the frequency axis of the spectrogram in log scal...

14 days ago | 0

Answered

Extract data between specific indicators from txt file

hello this is one solution - hope it helps ! tested with the attached txt file = readlines('data.txt'); data_str = 'R1'...

Extract data between specific indicators from txt file

hello this is one solution - hope it helps ! tested with the attached txt file = readlines('data.txt'); data_str = 'R1'...

14 days ago | 0

Answered

Problem in the data fitting with custom equation

hello here you are : t = [1.00E-07 2.00E-07 5.00E-07 1.00E-06 2.00E-06 5.00E-06 1.00E-05 ...

Problem in the data fitting with custom equation

hello here you are : t = [1.00E-07 2.00E-07 5.00E-07 1.00E-06 2.00E-06 5.00E-06 1.00E-05 ...

14 days ago | 0

| accepted

Answered

how to find the smallest point before rising limb and then calculate the gradient between that point and peak ??

hello once you have found the x location of the B point , let's say is xB , then you can find xA knowing the this point should...

how to find the smallest point before rising limb and then calculate the gradient between that point and peak ??

hello once you have found the x location of the B point , let's say is xB , then you can find xA knowing the this point should...

14 days ago | 0

Answered

Manual implementation of spectogram function

hello I share with you my own version , hope it helps ! notice i always use hanning window and the correction factor for ampl...

Manual implementation of spectogram function

hello I share with you my own version , hope it helps ! notice i always use hanning window and the correction factor for ampl...

15 days ago | 0

Answered

How to align the power plot correctly?

hello for me it would make sense to add simply half the buffer lenght to your time vector in the second graph, so that the pow...

How to align the power plot correctly?

hello for me it would make sense to add simply half the buffer lenght to your time vector in the second graph, so that the pow...

15 days ago | 1

| accepted

Answered

Butterworth filter for ecg signal in healthy people

hello dear all, an alternative using a 5th order IIR filter to remove the usual 50 Hz and harmonics mains hum LD = load('ECG_...

Butterworth filter for ecg signal in healthy people

hello dear all, an alternative using a 5th order IIR filter to remove the usual 50 Hz and harmonics mains hum LD = load('ECG_...

15 days ago | 0

Answered

saving data in a text file

hi again you were one micro inch from the solution : simply add the transpose operation on the data matrix to get it oriented...

saving data in a text file

hi again you were one micro inch from the solution : simply add the transpose operation on the data matrix to get it oriented...

15 days ago | 0

Answered

How do I calculate power for each signal?

hello if you want to compute a running rms value , you can use the movstd function - see help movstd and use K = fs=8192 to a...

How do I calculate power for each signal?

hello if you want to compute a running rms value , you can use the movstd function - see help movstd and use K = fs=8192 to a...

16 days ago | 1

Answered

How to set threshold point to the first peak arrival?

hello I wonder why doing the complex fft / ifft to remove low frequency signal this can be done easily still in time domain ...

How to set threshold point to the first peak arrival?

hello I wonder why doing the complex fft / ifft to remove low frequency signal this can be done easily still in time domain ...

16 days ago | 0

Answered

interp1 not working as expected and returning the same negative index for multiple query points (sample code and sample data included)

hello why do not use this crossing function to get the positive slope and negative slope crossing point to a given value ? l...

interp1 not working as expected and returning the same negative index for multiple query points (sample code and sample data included)

hello why do not use this crossing function to get the positive slope and negative slope crossing point to a given value ? l...

17 days ago | 1

Answered

Find the second signal points (x, y location) exactly the same place of the first signal peak (x, y) matlab

hello hope this helps you see function attached load('Value.txt'); x = Value(:,1); y = Value(:,2); t = 1:length(x); th...

Find the second signal points (x, y location) exactly the same place of the first signal peak (x, y) matlab

hello hope this helps you see function attached load('Value.txt'); x = Value(:,1); y = Value(:,2); t = 1:length(x); th...

17 days ago | 1

| accepted

Answered

Why the amplitude of theFFT trasform is not equal as the amplitude of the input signal?

hi again I was not happy to see that your code needed a very high sampling rate to display correctly the 5 frequencies this ...

Why the amplitude of theFFT trasform is not equal as the amplitude of the input signal?

hi again I was not happy to see that your code needed a very high sampling rate to display correctly the 5 frequencies this ...

17 days ago | 0

| accepted