No data points appear on the graph when I hit run
조회 수: 10 (최근 30일)
이전 댓글 표시
figure (1) %selects plotting window #1
plot(0, 98, 'c--', .02, 245, 'c--', .04, 490, 'c--', .05, 735, 'c--', .06, 931, 'c--', .08, 931, 'c--', .10, 980, 'c--');
I tried adding brackets like this ( [x,y,s,] ) and the graph itself dissapered
댓글 수: 0
답변 (1개)
DGM
2021년 9월 13일
편집: DGM
2021년 9월 13일
When you plot points one at a time, they are rendered as single unconnected points. Since there is no specified marker type, they don't show up.
You could specify a marker type (i'm using blue so it shows up better against white on the web-view)
plot(0, 98, 'bx', .02, 245, 'bx', .04, 490, 'bx', .05, 735, 'bx', .06, 931, 'bx', .08, 931, 'bx', .10, 980, 'bx');
or you could plot the points as a series
clc
x = [0 0.02 0.04 0.05 0.06 0.08 0.10];
y = [98 245 490 735 931 931 980];
plot(x,y,'b--')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!