Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Moving inside a graph/plot

1 回表示 (過去 30 日間)
Francesco Carraro
Francesco Carraro 2020 年 2 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
KSSV
KSSV 2020 年 2 月 18 日
Show us with example.

回答 (1 件)

Francesco Carraro
Francesco Carraro 2020 年 2 月 18 日
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)

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by