-3

How can I plot a stair curve/step in matlab? I think it should exist a special command to do this. See picture

stair Step

Lin404
  • 21
  • 6

1 Answers1

0

what about stairs?

X = linspace(0,4*pi,40);
Y = sin(X);

figure
stairs(Y, '-.or')

from MATLAB documentation

serial
  • 447
  • 4
  • 12
  • it is not that what I want...see my screenshot. my input are the red dots (points) with this points I want to create such stairs..... – Lin404 Sep 20 '16 at 14:54
  • X = linspace(0,4*pi,20); Y = sin(X); figure stairs(Y, '-.or') – Lin404 Sep 20 '16 at 14:59