Filling an area between max and minimum lines on a plot
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
採用された回答

19 件のコメント



Hi Jonas - thanks for chiming in. I'm not sure I fully understand, but I have gone back and checked and everything is a 401 x 1 vector.
As dpb pointed out it might be a bit confusing to reassign things to x & y (although I originally did it to make sure I understood what was going on) I have gone back to:
patch([increments' fliplr(increments')],[min_output fliplr(max_output)],'c')
Where:
each of the elements, increments', fliplr(increments'), min_output and fliplr(max_output) are all size 401 x 1.
If increments' is in fact 401 x 1 (single column) then fliplr (flip left right) does nothing for you. Use flipud (flip up down) in that case.
Again, if increments' is single column, then
[increments' flipud(increments')]
is double column, which strengthens my suspicion. Possibly, this could work for you:
patch([increments'; flipud(increments')],[min_output;flipud(max_output)],'c')
...or you could just keep the original code and just remove the transpose (').
Just make sure the input to patch (everything within the [ ]) are vectors and you should be fine
Yes, and your initial code was based on row vectors, not column which is why used fliplr. I tend to forget flip which is a (relatively) late arrival will do whichever is "the right thing" on a vector of either orientation instead of just operating on the specific orientation of the specific (original) versions.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
