How to run a loop to find the Hurst exponent corresponding to each row of the array?

3 Ansichten (letzte 30 Tage)
Abhishek Chakraborty am 12 Apr. 2022
I have an array of 352736 rows and 22 columns , X. I want to find the Hurst coefficient corresponding to the elements in each row so that the Hurst coefficient is a 352736 rows by 1 column vector. I tried the following code:
nsample = 22;
nvar = 352736;
H = zeros(nvar,1);
for i = 1:nvar
H=genhurst(cumsum(X(i,:)));
end
But the code is not working. How to do the same? Kindly help me. The Hurst exponent formulation comes from the link (https://in.mathworks.com/matlabcentral/fileexchange/30076-generalized-hurst-exponent).
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Abhishek Chakraborty am 12 Apr. 2022
I got it myself. Here is the code for it:
nsample = 22;
nvar = 352736;
H = zeros(nvar,1);
for i = 1:nvar
H(i,1)=genhurst(cumsum(X(i,:)));
end
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by