フィルターのクリア

Why won't matlab plot data from a table?

4 ビュー (過去 30 日間)
Daniel Montgomery
Daniel Montgomery 2020 年 2 月 21 日
回答済み: Rik 2020 年 2 月 21 日
%I am getting an empty plot from this code.
x1=linspace(0,500000,1000);
for x=1:17
y=lightint{x,1}
plot(x1,y)
end
  2 件のコメント
Sindar
Sindar 2020 年 2 月 21 日
It looks like y is a scalar value. Is that intentional?
Daniel Montgomery
Daniel Montgomery 2020 年 2 月 21 日
It is intentional.

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

採用された回答

Rik
Rik 2020 年 2 月 21 日
You're trying to plot a scalar multiple times, which Matlab happily does for you. You won't see anything, because your line style doesn't include a marker for single points. You also forgot hold on, so every iteration will wipe the previous.
x1=linspace(0,500000,1000);
for x=1:17
y=lightint{x,1};
plot(x1,y,'*b')
hold on
end
hold off

その他の回答 (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