Reputation: 11022
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 -
What is the simplest way to calculate that ?
Upvotes: 0
Views: 11762
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