Standard deviation calculation of a time series.
4 views (last 30 days)
Show older comments
I wrote the following script to plot the Multiscale Entropy of a time series My_Signal in Matlab format:
>> load 'My_Signal.m'
>> x = val(1,:);
>> [entropy,scale]=msentropy(x);
>> subplot(2,1,1);
>> plot(x);
>> subplot(2,1,2);
>> plot(scale,entropy)
function varargout=msentropy(varargin)
[y,scale,info]=msentropy(x,dn,dm,dr,N,N0,minM,maxM,maxScale,minR,maxR)
The input signal x is the only REQUIRED parameter and should be a Nx1 vector of doubles in which to calculate the multiscale entropy.
I would like minR to have the value 0.15*(Standard deviation of the original time series x ).
Questions:
1)How to implement the desired minR in Matlab ?
2)Since the input signal x should be a Nx1 vector of doubles, was it wise from me to use x=val(1,:) before making use of the function?
The input signals I am using are ECG data from Physionet.
0 Comments
Accepted Answer
KSSV
on 18 May 2017
as x is your signal (NX1) vector
minR = 0.15*std(x) ;
Read about std
If your val is a matrix and if it has signal information in the first row, then
x = val(:,1)
should be used....
0 Comments
More Answers (0)
See Also
Categories
Find more on ECG / EKG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!