simple question of creating a time vector
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
rami zaboura
el 7 de Ag. de 2020
Respondida: Star Strider
el 7 de Ag. de 2020
hello everyone,
i have a data set of 15345 samples, duration of 60 seconds, and sample frequency of 256 hz , how do i create the right time vector ?
i have tried to use : t=0:1/fs:1 and it wasnt correct, (fs being 256)
any suggetion would be helpful. thanks in advance:)
0 comentarios
Respuesta aceptada
Star Strider
el 7 de Ag. de 2020
Without the exact details of your file (that I suspect is not exactly 60 seconds long), something like this will work:
t = linspace(0, 60, 15345);
Note that this provides a sampling frequency of 255.73 Hz, so it may need to be tweaked a bit to get exactly the 256 Hz sampling frequency.
Calculating:
seconds = 15345/256
produces:
seconds =
59.9414
so you may want to check the actual duration.
.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!