Borrar filtros
Borrar filtros

how to compute duration of the signal

22 visualizaciones (últimos 30 días)
Elysi Cochin
Elysi Cochin el 6 de Mzo. de 2017
Respondida: Paul el 28 de Abr. de 2024
how to compute duration of the signal (dim: 200 x 1)

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Mzo. de 2017
Duration = number of samples divided by sampling frequency.
Equivalently,
Duration = number of samples times sample rate
  2 comentarios
Elysi Cochin
Elysi Cochin el 6 de Mzo. de 2017
Editada: Elysi Cochin el 6 de Mzo. de 2017
if sampling frequency not given, how can i compute that value?
number of samples? is it equal to length of signal?
sample rate? how to compute it? i have only the signal of dim (200 x 1)
Walter Roberson
Walter Roberson el 6 de Mzo. de 2017
If sampling frequency is not given, then use the sample rate.
If you do not know the sample rate of the sampling frequency then there is no way to determine the duration of a signal in any units other than "samples".
The duration of the signal in the unit of samples is the same as the size() of the signal, no matter what the signal contains. Remember, 0 is a valid signal value so you cannot go by the number of non-zero entries in the signal, for example.

Iniciar sesión para comentar.

Más respuestas (1)

Paul
Paul el 28 de Abr. de 2024
If a Matlab vector x is a subsequence of a discrete-time signal x[n], and if it's assumed that x[n] = 0 for all values of n outside the bounds of x, then the duration, N, of x[n] would be
x = [0 0 0 1 0 0 4 5 0 0]; % for example
N = find(x~=0,1,'last') - find(x~=0,1,'first') + 1
N = 5
If it is further assumed that x[n] is derived from uniform sampling of a continuous-time signal x(t) with sampling period T, then the duration, D, of x(t) would satisfy D < (N+1)*T.
It could be reasonably argued that N is the lower bound on the duration of x[n] and that a lower bound on the duration of x(t) would be D >= (N-1)*T.

Categorías

Más información sobre Signal Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by