how to eliminate undesidered lines

1 回表示 (過去 30 日間)
Tiziano Santese
Tiziano Santese 2019 年 10 月 19 日
回答済み: Image Analyst 2019 年 10 月 19 日
my function is the quasi-sinusoidal signal but i don't want those lines which link the beginning and the end of the plot. What should I do?

回答 (2 件)

Star Strider
Star Strider 2019 年 10 月 19 日
Use the sort or sortrows function to sort your data by the independent variable values.

Image Analyst
Image Analyst 2019 年 10 月 19 日
It looks like the last point is the same as the first. You could just plot all except the last point:
plot(x(end-1), y(end-1), 'g-', 'LineWidth', 2);

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by