Borrar filtros
Borrar filtros

move a window from top to bottom

2 visualizaciones (últimos 30 días)
ramya raj
ramya raj el 15 de Sept. de 2011
hai
any one please tell me how to make window of size 100 pixels centered at a particular location to move from top to bottom over a image
thanks in advance
  4 comentarios
ramya raj
ramya raj el 4 de Oct. de 2011
i am projecting some features and obtaining a graph
in the graph i am getting peak value at the location of 600
now i have to make a window centered at 600 and move the window from top to bottom how to do this
Jan
Jan el 4 de Oct. de 2011
@Ramya: It is not getting clearer. Although you know exactly what "projecting some feature and obtain a graph" means, we cannot have the faintest idea of what you are talking about. Neither "projecting", nor "feature", nor "graph" are unequivocal terms in the field of mathematics and computer science. The same problem concerns "window" - do you want a rectangle drawn inside the AXES, a FIGURE window or do you want to perfom some calculation on rectangular parts of the data? What is the "location 600"? Pixels relative to the screen or to the figure, or the Y- or X-value of the data?

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 15 de Sept. de 2011
If the window must move in a particular direction, top to bottom or bottom to top, then you will need to use a "for" loop or one of the compact equivalents (such as arrayfun())
If it does not matter which direction the window moves as long as everything gets covered, then see blockproc(), or blkproc() if you have an older version of MATLAB.

Walter Roberson
Walter Roberson el 4 de Oct. de 2011
Use rectangle() or patch() to create the window. Use a loop and set() and drawnow() to change the position of the window in a regular way and have the new position updated on the screen.
For example, if you created a patch, you could set() the YData property of the patch to change its vertical position.

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by