how to remove points which height (axis y) is more than 75% of the height

I have a graphic and i have to Remove all points which height (in the axis y) are more than 75% of the height. Actually, i don't remove this points, just move them to (x, 0.75·heightofword)
How can i do this?
Thanks very much!!!

 Respuesta aceptada

Just clip the y axis to 75% of the max y value.
maxY = max(y);
maxYForGraph = 0.75 * maxY;
ylim([min(y), maxYForGraph]);

3 comentarios

If you actually want to change the values of y, rather than just not displaying them by lowering the top of the graph box, then you can do this:
maxY = max(y);
maxYForGraph = 0.75 * maxY;
% Clip y values by changing them in the array.
y(y>maxYForGraph) = maxYForGraph;
plot(x,y); % May produce "flat tops" where it was clipped.
Thank you for the prompt reply Image Analyst! i'll try!
I have tried to use what you wrote me but without succes. anyway the thing that i have to do before is this:
To move the corner to (0,0).I have to find xmin and ymin and then each point (x,y) has to move to (x-xmin, y-ymin). The height of a word is ymax-ymin (before moving). If i compute it after having moved then it is ymax’ (ymax after the moving).
how i can do this?
Thanks so much!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Desktop en Centro de ayuda y File Exchange.

Preguntada:

el 1 de Oct. de 2013

Comentada:

el 1 de Oct. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by