ploting run time of a algorithm

I have written an algorithm. Now i have to show a graph of runtime of that algorithm.How can i plot that graph....Please help

回答(1 个)

Walter Roberson
Walter Roberson 2014-4-26
Algorithms do not have running times. Algorithms are abstractions, not implementations.
Programs have running times, given sufficient information about the hardware and software configuration and what else is running on the computer.
You can calculate the "big O" computational complexity and you can plot that, but that will not be the same as the running time of an implementation.

5 个评论

Is there any use of 'tic' and 'toc'?
tic and toc gives the running time but i want to plot that running time...
Jan
Jan 2014-4-27
编辑:Jan 2014-4-27
@Marben: So why don't you use the output of toc for plotting? Did you try it? All you need is the plot command.
Its not working sir....
@Marben: This lean message does not allow us to guess, what you have tried and which problems you see. If you want some help, post your code, explain what it does and how you want to change its behavior.
Of course it is working, when it is written correctly.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Call C++ from MATLAB 的更多信息

标签

尚未输入任何标签。

提问:

2014-4-26

评论:

Jan
2014-4-28

Community Treasure Hunt

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

Start Hunting!

Translated by