フィルターのクリア

Shading between two curves

1 回表示 (過去 30 日間)
Phil A
Phil A 2018 年 3 月 4 日
編集済み: njj1 2018 年 3 月 12 日
Hey, I would like to shade the area between the red curves (.png) and between the green curves. Would be great if someone can help me!
The very best, Philipp
  4 件のコメント
Phil A
Phil A 2018 年 3 月 11 日
Thanks for your comments. Finally made it work.
Star Strider
Star Strider 2018 年 3 月 11 日
Posting the relevant code (and data) would help others with similar problems.

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

回答 (1 件)

njj1
njj1 2018 年 3 月 8 日
編集済み: njj1 2018 年 3 月 12 日
You can try using the "fill" function (could also use "patch"). Just off the top of my head, if you can compute the area between one of the red/green curve boundaries then use the vector of x and y values to form the polygon. Just remember that the x values will travel from x0 to xmax and back to x0, and the same for the y values. You want to trace the red curve then connect the end of the red curve to the green curve, then travel back up the green curve. So, for example, given the rightmost red/green region, x will go from -2 to about 1.2 then back to -2, and y will go from 0 to 300 and back to 0.
  1 件のコメント
Phil A
Phil A 2018 年 3 月 11 日
Got it using "patch". Thanks a lot!

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

カテゴリ

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