Borrar filtros
Borrar filtros

Calculate the complexity of an algorithm

1 visualización (últimos 30 días)
Max
Max el 5 de Dic. de 2012
Hi at all, excuse me if something is not clear, I try to write in English as clear (and correct) as possible;)
I wrote an algorithm and now I want to calculate its complexity; in the evaluation of the complexity I think to exclude assignments that have constant complexity O (1) as irrelevant. I also do not calculate the "if" in which is printed only a message if a condition is satisfied or not.
The remaining important instructions are "for-cycle" and the construction of a cubic spline (understood as interpolation of n points);
As for loops ranging from the first to n-th, the complexity is O (n), correct?
Then, on the construction of the spline, how can I evaluate the computational cost knowing that I have to interpolate two vectors of n elements?
Thanks a lot
Max

Respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by