- #1
mayeeta
- 5
- 0
Homework Statement
Via iteration. A continued fraction for pi is:
Write an algorithm to compute this to n terms using Matlab.
1st term would be 3+1/9
The Attempt at a Solution
p = '1';
for k = 1:n
p=3+(-1+2^n)/(3+p);
end
p
I'm very new to programming, and I can only think of this.