MATLAB Answers

Split every current signal into N segments of Length L

5 views (last 30 days)
Chloe Sim
Chloe Sim on 15 Feb 2020
Commented: Star Strider on 16 Feb 2020
Hello! I have a 3 phase raw current signal that I want to split into 100 segments of 0.1 second so as to reduce the data size for signal processing and takes only the peak to peak and amplitude maximum values. How can I archieve this in MATLAB?

  1 Comment

dpb on 15 Feb 2020
Well, 0.1s of your signal will be however many points is 0.1/dt where dt is your sample rate.
Many of the signal processing toolbox functions work by windowing or virtually all Matlab functions will treat columns of an array as independent observations and operate by column.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 15 Feb 2020
Assuming I understand waht you want to do, I would use the Signal Processing Toolbox buffer function to do that.
You would have to calculate ‘L’ (number of samples) based on your sampling frequency (in samples/time unit), so if the time units are seconds L = 0.1*sampling_frequency.
The buffer function returns the segments in column-major order, so you can do the fft on the output of your buffer call:
FT = buffer(your_signal, L)/L;
will return the scaled complex Fourier transform of each column.


Show 3 older comments
Star Strider
Star Strider on 16 Feb 2020
Yes. The segments are columns in ‘y’, so it operates on them by default, unless you specify a different dimension (specifically dimension 2), in which case it will operate across the rows (that does not make sense in this context).

Sign in to comment.

More Answers (0)

Sign in to answer this question.