Functions | |
y (isinf(y))=0 | |
if (nargin< 2) tol | |
while (1) idx | |
if (isempty(idx)) if(isempty(steps)) steps | |
tsteps (idx) | |
endif | frac (idx) |
n (idx) | |
d (idx) | |
endwhile | if (nargout==2) n |
n (isinf(x)) | |
d (isinf(x))=0 | |
while (true) step | |
if (isnan(step)) break | |
endif | if (j > nsteps||isnan(steps(i, j))) if(step< 0) s |
Variables | |
function [n, d] | |
endif | y = x(:) |
endif | n = round(y) |
d = ones(size(y)) | |
frac = y-n | |
lastn = ones(size(y)) | |
lastd = zeros(size(y)) | |
nd = ndims(y) | |
nsz = numel (y) | |
steps = zeros([nsz, 0]) | |
endif | break |
endif | flip = 1./frac(idx) |
step = round(flip) | |
nextn = n | |
nextd = d | |
nsteps = size(steps, 2) | |
for | i |
j = 1 | |
else | s = [s(1:end-1), " + 1/", int2str(step)] |
n_nc = columns (n) | |
s_nc = columns (s) |
d | ( | isinf(x) | ) | [pure virtual] |
d | ( | idx | ) |
endif frac | ( | idx | ) |
if | ( | isnan(step) | ) |
endwhile if | ( | nargout | = =2 |
) |
if | ( | isempty(idx) | ) |
if | ( | ) |
n | ( | isinf(x) | ) |
n | ( | idx | ) |
tsteps | ( | idx | ) |
while | ( | true | ) |
while | ( | 1 | ) |
y | ( | isinf(y) | ) | [pure virtual] |
endif break |
d = ones(size(y)) |
frac = y-n |
j = 1 |
lastd = zeros(size(y)) |
lastn = ones(size(y)) |
n_nc = columns (n) |
nextd = d |
nextn = n |
nsz = numel (y) |
s_nc = columns (s) |
endif y = x(:) |