Filling an area between max and minimum lines on a plot
Ahora está siguiendo esta pregunta
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Se ha producido un error
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
0 votos
Comparte un enlace a esta pregunta
Respuesta aceptada
1 voto
Comparte un enlace a esta respuesta

19 comentarios
Comparte un enlace a este comentario



Comparte un enlace a este comentario
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Comparte un enlace a este comentario
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.
Comparte un enlace a este comentario
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
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Comparte un enlace a este comentario
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.
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)
