how can i connect separate lines together in a plot?

3 ビュー (過去 30 日間)
Omar Almahallawy
Omar Almahallawy 2019 年 6 月 22 日
編集済み: dpb 2019 年 6 月 22 日
how can i connect the red lines together
and the purple lines together.
FYI the have two seperate equations
i would like a vertical line
  4 件のコメント
madhan ravi
madhan ravi 2019 年 6 月 22 日
編集済み: madhan ravi 2019 年 6 月 22 日
Could you share the missing datas by clicking the paper clip button?
dpb
dpb 2019 年 6 月 22 日
編集済み: dpb 2019 年 6 月 22 日
Your two arrays apparently don't have the same number of columns...I presume for four lines you either had two of two columns each or four of one...whatever they are, must catenate the same number of columns.
NB: The above code was intended to be indicative of how to solve the questions, not necessarily verbatim because you didn't show us enough to know how your data were stored/plotted.
It should be clear the logic to solve your problem is to either plot each line that is wanted to be connected as a single x,y set of data and then Matlab will automagically draw the line between the points between the two original arrays.
Or, if you've already generated the plot separately as shown, then you simply draw a line from the last x,y pair of the first line to the first x,y pair of the second. The precise syntax for referring to the specific elements of the arrays and putting them together obviously depends on the storage arrangment of that data which we do not know and therefore, can only guess at.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by