FRACLAB Functions |
![]() ![]() |
Generates a Weierstrass function
WEI = genewei(N,H)
WEI = genewei(...,'Method')
WEI = genewei(...,'Propertyname',Propertyvalue)
WEI = genewei(N,H) Generates the Weierstrass function, WEI, using a sample size, N, and a Holder exponent H. The parameter N is a positive integer and the parameter H is a real in (0,1).
WEI = genewei(...,'Method') Generates the Weierstrass function, WEI, using a specific method. The supported Methods can be choosen from the list below :
Specifier | Method Type |
---|---|
'stoc' | Stochastic (default) |
'det' | Deterministic |
H = genewei(...,'Propertyname',Propertyvalue) Generates the Weierstrass function, WEI, applying the specified property settings. The property setting can be choosen from the list below :
Property | Purpose |
---|---|
'support' |
The WEI is computed using a specific size of time support, TMAX. The parameter TMAX
is a positive integer. |
'frequency' |
The WEI is computed using a specific multiplicative frequency ration, L. The parameter L is a positive
real superior to 1. |
'nterms' |
The WEI is computed using a specific number of terms in the sum, K. The parameter K
is a positive integer. |
'seed' |
The WEI is computed with a specific random seed, SEED. This is useful to generate the same path several times
or to compare the paths of different WEIs. |
N = 1024; H = 0.7; t = linspace(0,1,N);
x = genewei(N,H);
figure; plot(t,x);
title('Weierstrass function with H = 0.7'); xlabel('time');
N = 2048; H = 0.3; t = linspace(0,1,N);
x = genewei(N,H,'det');
figure; plot(t,x);
title('Deterministic Weierstrass function with H = 0.3'); xlabel('time');
N = 2048; H = 0.5; L1 = 5; T1 = 2;
x1 = genewei(N,H,'seed',100);
x2 = genewei(N,H,'frequency',L1,'seed',100);
x3 = genewei(N,H,'support',T1,'seed',100);
figure; subplot(1,2,1); hold on; plot(x1); plot(x2,'r');
legend('frequency = 2','frequency = 5','Location','SouthEast');
title('Weierstrass function with H = 0.5');
xlabel('number of points'); xlim([0 N]);
subplot(1,2,2); hold on; plot(x1); plot(x3,'r');
legend('time support = 1','time support = 2','Location','SouthEast');
title('Weierstrass function with H = 0.5');
xlabel('number of points'); xlim([0 N]);
![]() |
fl_regression | genegwei | ![]() |