The labels are being put into the proper place on the graph. Your third point is at y = -3.something which happens to be outside the range of what you are displaying. That is not the fault of text(), that is because you have told it coordinates that are not on your graph.
That code does not produce the plot you show above, not even if you set(gca,'xdir','reverse') to reverse the X axes. The upper line that is plotted in your image is about 5 units lower than the actual y2(y1(f)) value. Meanwhile the third text label that is to the upper right and outside the graph appears to be at the correct y2(y1(f)) value.
Side note: you can make your plotting shorter, using just a single statement.
h = plot( f , y1(f), '--o', f, y2(y1(f)), '--o' )
I would, by the way, not call the result ax1 as the result of plot() is line objects, not axes objects.
Well the plot line you provided works and if I use set(gca,'xdir','reverse') it gets what I want - see attached image.
There are two things I would like to do with this: The first is plot all 8 points on the two functions and the second extrapolate these functions as they approach 0.
The red and green star, what is the purpose of this? It's not a necessary point, I just want to show the 8 points and extrapolate the end of the function as f approaches 0.
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.
Translated by
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.