How can i make a 2D text flash for 5 seconds while the myDAq detects data
Show older comments
figure;
for i=0:1:5
counter=0
counter=0+i
subplot(2,1,1)
xlim([0 5])
set(gca, 'Color', 'k')
drawnow;
text(0.5,2.5,'Measuring','Color','white','FontSize',12, 'TimeRange = 0..5')
pause(.1)
text(1,2.5,'Measuring','Color','black','FontSize',12)
subplot(2,1,2)
set(gca, 'Color', 'k')
BPM=0;
ti=0;
FR=0;
xlim([0 10])
text(1,0.95,['BPM: ' BPM],'Color','white','FontSize',12)
text(4.5,0.95,['P2P time: ' ti, 's'],'Color','white','FontSize',12)
text(8,0.95,['Frequency: ' FR, 'Hz'],'Color','white','FontSize',12)
end
while the mydaq detects data, i want to display 'Measuring the RAW EMG signal' and the time left. the mydaq detects dats for 5 seconds. I want both the text and the timer to flash on the plot
Answers (1)
Walter Roberson
on 22 Oct 2018
0 votes
You can record the handle of a text() object, and set the object Visible to 'on' or 'off' . After that you would pause() or drawnow() to update it.
Categories
Find more on Signal Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!