フィルターのクリア

Graph only plotting 1 point

2 ビュー (過去 30 日間)
See Kai Xiang
See Kai Xiang 2021 年 10 月 20 日
コメント済み: See Kai Xiang 2021 年 10 月 23 日
Hi all, i am unable to plot my graph using my code, for some reason whenever i plot it, MATLAB would simply show me a blank graph, which i woould assume that the graph only plotted 1 point. However, i do not understand why it would only point a single point.
This is my code, where T is my data set of 261345 X 1
figure(3)
hold on
for q=0:0.1:max(n)
Num=sum(T>q)
datasize=261345 % have to change manually
P=Num/datasize
semilogy(q,P)
hold on
end

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 10 月 20 日
編集済み: Cris LaPierre 2021 年 10 月 20 日
The default syntax does not include a marker style. If your plot is only a single point, then you cannot see the line. Just include a markerstyle.
for q=0:0.1:max(n)
Num=sum(T>q)
datasize=261345 % have to change manually
P=Num/datasize
semilogy(q,P,'o')
hold on
end
hold off
  1 件のコメント
See Kai Xiang
See Kai Xiang 2021 年 10 月 23 日
thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by