Timing in C & Matlab

1 次查看(过去 30 天)
jason beckell
jason beckell 2012-1-25
Hello to everyone!
I am a student who has a question about time detection in Matlab / Cuda. To be short, I have a Matlab script which calls an external routine from a C library that was written by me. Since I have to compare this solution to another one, I'd like to detect the amount of time-elapsed in reading and writing (i.e. leaving out the the time consumed in the computation itself of the routine called from the external library)of a vector in a simple case test. Hence, my idea was to read time system from Matlab as I launch the application, then read time system on C before I start the computation, read it again as I finish the computation on C and eventually read it on Matlab as such a script ends. How could I menage to get all of this information? Which solution would you recommend me?
Thank you very much to everybody!
Jason
  3 个评论
jason beckell
jason beckell 2012-1-25
Thank you Siva, I already thought about such a solution, but the problem would be that, if I stopped the timer before I called the routine on the external library I would not take into account the time needed to load the external routine on memory. Anyway, I have succeded in finding a function in C which tells me the system time in milliseconds as well (i.e. gettimeofday), but I can't find up something similar in Matlab. Can any of you give me a hand? Thanks to everybody!
K E
K E 2012-2-2
The Matlab function "now" tells the present system time, if that is what you are looking for.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by