URL87
URL87

Reputation: 11022

Matlab - calculate rate of convergence

Having vector x and I have to calculate its rate of convergence , for this purpose it is just return a vector of values which show the iterations of the follow series according to x length -

enter image description here

What is the simplest way to calculate that ?

Upvotes: 0

Views: 11762

Answers (1)

Eitan T
Eitan T

Reputation: 32930

To obtain a vector of the values specified in the question, just do:

r = abs(diff(x(2:end)) ./ diff(x(1:end - 1)) .^ p);

Upvotes: 2

Related Questions