Code covered by the BSD License
-
[ctimes, cval]=linjpcut(jmpti...
LINJPCUT Truncate piecewise linear functions at a given time.
-
[ctimes, cval]=staircut(jmpti...
STAIRCUT Truncate piecewise constant functions at a given time.
-
[ctimes, le_ij, cle_ij, exi, ...
STTIMESCUT Truncate nondecreasing sequences at a given point.
-
countpath(cdir)
COUNTPATH add the counting processes and random number
-
distrmu(distr, dpar)
DISTRMU a table-lookup function. For a given handle to an external
-
distrstat(distr, dpar)
-
onoff(nproc, maxtime, on_dist...
ONOFF generate N independent stationary on-off processes. An
-
rencount(nproc, maxtime, dist...
% RENCOUNT Simulate independent renewal counting processes
-
renewpp(nproc, maxtime, distr...
RENEWPP Generate a matrix of N independent renewal point
-
renrew(nproc, maxtime, ren1_d...
% RENREW Generate N independent renewal reward processes
-
renuni(nproc, maxtime)
RENUNI Generate a matrix of N independent renewal counting
-
simbinom(npoints, n, p)
SIMBINOM random numbers from binomial distribution
-
simdiscr(npoints, pdf, val)
SIMDISCR random numbers from a discrete random
-
simexp(M, N, lambda)
SIMEXP random numbers from exponential distribution
-
simgeom(npoints, p)
SIMGEOM random numbers from geometric distribution
-
simlinear(M, N)
-
simpareto(M, N, alpha)
SIMPARETO random numbers from Pareto distribution:
-
simparetonrm(M, N, alpha, gam...
SIMPARETONRM Generate a matrix of random numbers from the
-
stairintegr(jptimes, fval, st...
% STAIRINTEGR Integrate piecewise constant (stair) functions. The results
-
stairsum(jmptimes, fval)
% STAIRSUM Add piecewise constant (stair) functions.
-
stsumplot(jptimes, fval, stim...
STSUMPLOT Plot piecewise constant functions and their sum. The
-
View all files
|
|
| stsumplot(jptimes, fval, stimes, sval)
|
function [] = stsumplot(jptimes, fval, stimes, sval)
% STSUMPLOT Plot piecewise constant functions and their sum. The
% functions are stored in two matrices containing the jumps points
% and function values respectively. If they have different number of
% jumps, each vector is padded with the last value to have the same
% length.
%
% [] = stsumplot(jptimes, fval, stimes, sval)
%
% Inputs:
% jptimes - a matrix of the jump times stored columnwise
% fval - a matrix of the function values at the jump points
% stored columnwise
% stimes - a column vector of the jump times of the sum
% sval - a column vector of the function values at the jump
% points of the sum
%
% Authors: R.Gaigalas, I.Kaj
% v1.0 05-Oct-05
clf;
hold on;
% use the built-in columwise loop
stairs(jptimes, fval, 'b');
% plot the sum
stairs(stimes, sval, '-r');
hold off;
|
|
Contact us at files@mathworks.com