Datasets: Examples from paper "Conditions for continuity of fractional velocity and existence of fractional Taylor expansions"

Example 1, Dimiter Prodanov (C) 2017

dyadseq(n):=block([seq:[0,1], l:[], r:[]],
    if not integerp(n) then return ('dyadseq(n)),
    for k:1 thru n do (
        r:seq,
        l:r/2,
        r:reverse(1-l),
        pop(r),
        seq:append(l, r)
    ),
    seq
);

De Rahm's function IFS

derhamr(x, b, n):=block( [a:1/2^b],
if not numberp(n) then return('derhamr(x, b, n)),
    if x =0 then return(0),
    if x =1 then return(1),
    if n>0 then 
        if x >=0 and x <= 1/2 then 
            a*derhamr(2*x, b, n-1)
        else  
            (1-a)*derhamr(2*x-1, b, n-1)+a
    else x^b
);

beta-velocity 

derhamrd(x, b, n):=block( [a:1/2^b],
if not numberp(n) then return('derhamrd(x, b, n)),
    if x =0 then return(1),
    if x =1 then return(0),
    if n>0 then 
        if x >0 and x <= 1/2 then 
             derhamrd(2*x, b, n-1)
        else  
            2^b*(1-a)*derhamrd(2*x-1, b, n-1)
    else 1
);

D:dyadseq(7)$

Y:makelist( float(derhamr(D[i], 1/2, 10)), i, length(D))$

X:float(D)$

Y2:makelist( float(derhamrd(D[i], 1/2, 6)), i, length(D))$

wxplot2d([['discrete, X, Y], ['discrete, X, Y2]], [x,0,1], [y,0,1])$

Code for Fig. 1A

wxplot2d([ sqrt(x), derhamr(x, 1/2, 8)], [x,0,1], [y,0,1])$

Code for Fig. 1B

wxplot2d([ derhamrd(x, 1/2, 4), derhamrd(x, 1/2, 8)], [x,0,1], [y,0,1])$

Code for data export

Z:transpose(matrix(X,Y,Y2))$

write_data(Z,"c:\\temp\\test.csv", 'comma);

;