Verfasst am: 20.11.2009, 22:23
Titel: Punkte miteinander verbinden
Hey Leute,
ich habe hier einen Algorithmus für einen Cauchy-Prozess vorliegen, der kleine Sprünge beinhaltet. Ich möchte nun diese Punkte miteinander verbinden, wie könnte ich das anstellen?
LG
Code:
function[T,X] = residstable(tmax, npt, alpha, epsilon) % [T,X] = residstable(tmax, npt, alpha, epsilon) % % This function illustrates the convergence of % renormalized small jumps to Brownian motion % It simulates a trajectory of renormalized small jumps % of an alpha-stable process using series representation % All jumps smaller than epsilon are kept % The renormalization factor is equal to standard deviation % of the residual process % tmax: length of the interval; npt: average number of points % % This function requires stats toolbox
Njumps = poissrnd(npt); % Actual number of points gamma =unifrnd(0,npt/tmax,1,Njumps); % Poisson arrival times (in random order)
V = 2*floor(unifrnd(0,2,1,Njumps))-1; % Rademacher r.v.-s times = unifrnd(0,tmax,1,Njumps); % Jump times
sizes = (epsilon^(1-alpha/2)*sqrt(2/(2-alpha)))^(-1)*(alpha*gamma/2+1/epsilon^alpha).^(-1/alpha).*V; % Jump sizes
T = kron(sort(times),[111]);
X = [0cumsum(sizes)];
X = kron(X,[11NaN]);
T = [0 T tmax]; % Adding zero in the beginning
X = X(1:end-1);
plot(T,X)
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.