Filling an area between max and minimum lines on a plot
Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
0 votes
Partagez un lien vers cette question
Réponse acceptée
1 vote
Partagez un lien vers cette réponse

19 commentaires
Partagez un lien vers ce commentaire



Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
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.
Partagez un lien vers ce commentaire
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
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
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.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
