필터 지우기
필터 지우기

How to plot with continuous line

조회 수: 2 (최근 30일)
K
K 2012년 11월 24일
Hi, I have an array and I want to plot it into graph. My problem is I got a dotted graph line and not a continuous one. How should I change my code to solve this problem? My code look like this:
Figure(1) hold on
for i= 1:5 array(i) = i*3; plot (i, array(i)); end

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 24일
편집: Azzi Abdelmalek 2012년 11월 24일
Use plot after the loop
for ii= 1:5
x(ii)=ii
array(ii) = ii*3;
end
plot (x, array);
%don't use i and j as variables (used with comlex numbers)
  댓글 수: 5
K
K 2012년 11월 24일
One more question. Do you know what is the maximum elements of array that Matlab can support?
Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 24일
편집: Azzi Abdelmalek 2012년 11월 24일
I can't tell exactly, that depends on your matlab version, also on your computer power and memory. look at this link http://www.mathworks.com/support/solutions/en/data/1-IHYHFZ/index.html

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by