extract elements from signal

2 Ansichten (letzte 30 Tage)
Andreas Parlani
Andreas Parlani am 14 Jan. 2021
Kommentiert: Andreas Parlani am 15 Jan. 2021
Hello guys, i have a question. I have a signal (ECG) in a vector with 1column 4000 rows and i want to extract every 1000 elements and load them in 4 different vectors with 1column and 1000rows. One way is for example to do g=x(1:1000), z=x(1001:2000) etc x is the initial vector, but i want a better way, more beautiful.

Akzeptierte Antwort

dpb
dpb am 15 Jan. 2021
Don't create new variables, just
x=reshape(x,1000,[]).';
and reference the column of interest.
If you create new variables, you then have to write code to explicitly address each one; this way just change an index.
  1 Kommentar
Andreas Parlani
Andreas Parlani am 15 Jan. 2021
Thanks for your response, very usefull !

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu ECG / EKG finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by