stsumplot.m
来自「用matalab开发的随机数生成程序包」· M 代码 · 共 31 行
M
31 行
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;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?