Test  Status  Code Input and Output 

1  Pass 
%%
c=ones(1,40);
x=(1+sqrt(5))/2;
y=contfrac(c);
assert(abs(yx)<1e15)
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]

2  Pass 
%%
c=[3 7 15 1 292 1 1 1 2 1 3 1 14];
x=pi;
y=contfrac(c);
assert(abs(yx)<1e15)
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]

3  Pass 
%%
c=[3 7 15 1];
x=355/113;
y=contfrac(c);
assert(abs(yx)<1e15)
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]

4  Pass 
%%
c=[1 1 1 3 1 5 1 7 1 9 1 11 1 13 1 15 1 17 1 19 1;
2 1 2 1 1 4 1 1 6 1 1 8 1 1 10 1 1 12 1 1 14];
x=[tan(1);exp(1)];
y=contfrac(c);
assert(max(abs(yx))<1e15)
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]

5  Pass 
%%
c=(1:9)'*[1 2*ones(1,20)];
x=sqrt([2;5;10;17;26;37;50;65;82]);
y=contfrac(c);
assert(max(abs(yx))<1e15)
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]
[Warning: Matrix is singular to working precision.]
[> In contfrac at 5
In verifyCode>evaluateCode at 227
In verifyCode at 40
In fevalJSON at 14]

Remove the small words from a list of words.
621 Solvers
Back to basics 16  byte order
161 Solvers
Detect a number and replace with two NaN's
170 Solvers
346 Solvers
324 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!