what is the correct formula of (sum of ...from...to...) in matlab

1 visualización (últimos 30 días)
Good mind
Good mind el 27 de Abr. de 2017
Comentada: Good mind el 30 de Abr. de 2017
snrin=(-5:5:55); %initial snr
N=length(ecg); % length of ecg signal
n=(0:N-1);
e=sum (ecg^2) from 0 to N-1; **% I want to write this formula correctly**
f=sum (W^2) from 0 to N-1; *% also this*
A=sqrt(e/(10^(snrin/10))*f); *% also this one*
  2 comentarios
James Tursa
James Tursa el 27 de Abr. de 2017
How is the indexing from 0 to N-1 related to the variable "ecg"? I.e., what would an index of 0 mean? Same question for the other sums.
Good mind
Good mind el 27 de Abr. de 2017
ECG is a signal sampled with 360hz. 0 to N-1 i.e means along the length of ecg signal

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Abr. de 2017
e = sum( ecg(1+n).^2 );
f = sum( W(1+n).^2 );
  7 comentarios
Walter Roberson
Walter Roberson el 30 de Abr. de 2017
ecgnoisy = repmat(ecg(:), 1, length(A)) + repmat(W(:), 1, length(A)) .* repmat(A, numel(W), 1);
Good mind
Good mind el 30 de Abr. de 2017
thank you so much

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by