MATLAB: How to plot step graph

plotstep

I want to plot a step graph using the two matrices below:
W = [0.992; 0.997; 0.99996; 0.99997; 0.999992; 0.999995; 1.0000;];
X = [100; 98; 65; 45; 38; 36; 0;];
I want to use W as the x-axis and X as y-axis

Best Answer

I am not certain what a ‘step graph’ refers to.
Try this:
figure
stairs(W, X, 'LineWidth',2)
grid