%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?
It is intentional.

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

 채택된 답변

Rik
Rik 2020년 2월 21일

0 개 추천

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개)

카테고리

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

제품

태그

질문:

2020년 2월 21일

답변:

Rik
2020년 2월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by