필터 지우기
필터 지우기

How can i connect different points using straight line after plotting? is there any plotting tool?

조회 수: 1 (최근 30일)

답변 (3개)

Adam
Adam 2016년 7월 25일
How did you plot your points? The plot or line functions will, by default join points with a line.
  댓글 수: 1
adnan nizami
adnan nizami 2016년 7월 25일
Thanks for replying. actually i am getting single point for every iteration. I just want to connect them(all those point) through line at the end

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


Image Analyst
Image Analyst 2016년 7월 25일
Try this with your data
plot(x, y, 'b*-', 'LineWidth', 2, 'MarkerSize', 15);
grid on;
  댓글 수: 2
adnan nizami
adnan nizami 2016년 7월 25일
is writing a command is necessary?. isn't any tool in figure to do same task
Image Analyst
Image Analyst 2016년 7월 25일
I don't know as I do all my interaction with MATLAB through programming rather than interactively. From your reply to Adam, it also sounds like you have a program, so what's the big deal with just adding a plot() call to your program?

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


Star Strider
Star Strider 2016년 7월 25일
Are you plotting those in a loop? If you are, index the variables and then plot at the end of the loop:
x = 5:8;
for k1 = 1:length(x)
y(k1) = 16 - (x(k1)-7).^2;
end
figure(1)
plot(x, y, '-', x, y, '.')

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by