tic toc in a GUI
古いコメントを表示
hello all,
I have created a GUI, using GUIDE. I have added pushbuttons which perform a task. The start button, plots a graph and plays a wavefile that I have assigned to it. in the start button I have added as well a 'tic'.
on the other side of the GUI is have another button, the save button. The function of that button is to save to a vector the exact time that I push the button. The code that I have used saves only the last instance, while I want to be able to see all of the elements of that vector.
handles.counter.push(handles.count + 1)
handles.sfront(size(handles.counter)) = toc
Is there a way to save all of the instances to the sfront vector?
Thank you in advance!
採用された回答
その他の回答 (1 件)
Babak
2013 年 4 月 10 日
0 投票
tic toc gives you the total elapsed amount of time. There is no such meaning of all the instances... you cannot save time instances..
4 件のコメント
tony karamp
2013 年 4 月 10 日
Babak
2013 年 4 月 10 日
Time is a continuous variable. I suppose you need to get the time at some instances that you wish. As soon as you command tic, it sstarts measuring the time and when you say toc it gives you the elapsed time from the last tic. If you say toc again it gives you another elapsed time which is longer than the last one. so you can just simply say tic toc toc toc toc and get times at instances you wish. Try it in the command window. I would use it this way and save the toc values.
tony karamp
2013 年 4 月 10 日
編集済み: tony karamp
2013 年 4 月 10 日
Babak
2013 年 4 月 10 日
I don't know. I suggest you create another question and ask your "new" question from public.
カテゴリ
ヘルプ センター および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!