fillstairs(X, Y1, Y2, h)

Version 1.0.0.0 (1.05 KB) by Florian
Fill area between two stair functions
78 Downloads
Updated 25 Jan 2016

View License

%% fillstairs
% - Method which draws two stair-functions and fills the area between them
% - Created by Florian Krause on 2016-01-25 (V1.0)
% - Use it as you like.
% Fillstairs-Example

clear all
close all
clc

% X-Data
X = 0:23;

% Y-Data
Y1 = sin(X .* (2*pi/max(X)) ); % Func 1
Y2 = Y1 + 0.1*sin(X .* (2*pi/max(X)) ); % Func 2

% Draw
h = figure(1);
fillstairs(X,Y1,Y2,h);
title('Fillstairs Example');

Cite As

Florian (2024). fillstairs(X, Y1, Y2, h) (https://www.mathworks.com/matlabcentral/fileexchange/55080-fillstairs-x-y1-y2-h), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Stair Plots in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0