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

 채택된 답변

Star Strider
Star Strider 2019년 8월 17일

2 개 추천

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

댓글 수: 2

JL
JL 2019년 8월 17일
yup, this is what I want! thank you :)
Star Strider
Star Strider 2019년 8월 17일
My pleasure!
If my Answer helped you solve your problem, please Accept it!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

JL
2019년 8월 17일

댓글:

2019년 8월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by