Continuous plot(x,y) for discrete data points
36 ビュー (過去 30 日間)
古いコメントを表示
When using plot(x,y) function, [say for example x = 1X20 matrix and y=sin(x), which means that there are only 20 data points), matlab plot comes out to be a continuous one. Is this always the case? I just started using matlab.
1 件のコメント
Chandeesh
2022 年 7 月 25 日
Select the functions to represent the graph of a continuous and a discrete function.
採用された回答
Azzi Abdelmalek
2013 年 12 月 30 日
You can use plot for continuous plot, or stem function for discrete plot. You can also use scatter function
Example
x=0:10
y=sin(x)
plottx,y);
figure
stem(x,y);
figure
scatter(x,y)
その他の回答 (2 件)
Sean de Wolski
2013 年 12 月 30 日
編集済み: Sean de Wolski
2013 年 12 月 30 日
plot is just connecting the points with lines. If you don't want this, you can specify the marker. For example, for a red *
>> plot(0:0.1:2*pi,sin(0:0.1:2*pi),'r*')
And for more info:
doc plot
Anil
2022 年 12 月 28 日
i only have one point for x and y how can i generate a continuous plot for this
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!