plotting lines as separate objects
显示 更早的评论

Hi Guys, I am new to matlab and I am trying to plot the following points. The first column represents x values and the second column represents y values. If I plot(x,y), matlab plots all the points as one continuous line. But what I want is different lines separated by the NaN like shown above. For example, I want first four (x,y) points to be one separate line, the next three (x,y) points to be another line and so on... I want to plot these lines separately because I need to find the centroid of each lines (actually these are curves).
Can anyone help, please?
Thank you!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!