Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Moving inside a graph/plot

1 visualización (últimos 30 días)
Francesco Carraro
Francesco Carraro el 18 de Feb. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello everyone,
I can't figure out how to moving and selecting a specific area of a graphic:
Let's say I have a main graphic where are plotted x coordinates of a subject in a space of time of 1 minute;
what I'm looking for , is a function that plot the main graphic with a cursor that can select a specific portion, let's say 10 sec.
and plotting that portion on to another graphic. Many thanks for everyone will help me out.
Francesco
  1 comentario
KSSV
KSSV el 18 de Feb. de 2020
Show us with example.

Respuestas (1)

Francesco Carraro
Francesco Carraro el 18 de Feb. de 2020
I'll show a simple example with the "sin" function:
In the bottom graphic I want to show the full plot from 0 to 100s, with a selector that can be moved and can select a specif part of the plot ( 10 second in the example).
In the top graphic, I want to show the portion of the bottom graphic selected with the moving cursor ( form 10s to 20s in the example), a sort of a zoom that can be moved back and fourth around the bottom graphic
Maybe the red lines in the picture will help explain better what I'm looking for.
x = 0:0.1:100;
time = 0:0.1:100;
y1 = sin(x);
y2 = sin(time);
figure
subplot(2,1,1);
plot(x,y1)
subplot(2,1,2);
plot(x,y2)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by