I want to divide the domain 0 to pi in 5 parts by geometric progression with common ratio r=1.1? how should i do that?

I want to divide the domain 0 to pi in 5 parts by geometric progression with common ratio r=1.1? how should i do that?

 Accepted Answer

r = 1.1;
a = pi*(r-1)/(r^5-1);
x = cumsum([0,a*[1,r,r^2,r^3,r^4]]);
The values in x are the six endpoints of the five intervals.

More Answers (0)

Categories

Find more on Numerical Integration and Differential Equations 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!