How to get current point at certain time points?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
lou
am 24 Sep. 2015
Beantwortet: Walter Roberson
am 24 Sep. 2015
Hi!
I would like to set a sampling rate of get(gcf, 'currentpoint') to such that I would get the current point let's say in every half second. My current script is:
cp=get(gcf,'currentpoint');
t=timer;
set(t,'executionMode','fixedrate');
set(t,'period',.5);
set(t,'timerfcn',cp);
start(t);
However, this doesn't work. I get an error that says: TimerFcn callback must be set to a string, a function handle, or a 1-by-N cell array.
How to fix my script?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 24 Sep. 2015
curfig = gcf;
cp = @(src,event) get(curfig,'currentpoint');
But once you have fetched it, what are you going to do with it?
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!