How can i connect different points using straight line after plotting? is there any plotting tool?
1 回表示 (過去 30 日間)
古いコメントを表示
回答 (3 件)
Adam
2016 年 7 月 25 日
How did you plot your points? The plot or line functions will, by default join points with a line.
Image Analyst
2016 年 7 月 25 日
Try this with your data
plot(x, y, 'b*-', 'LineWidth', 2, 'MarkerSize', 15);
grid on;
2 件のコメント
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
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, '.')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!