Azzera filtri
Azzera filtri

Calculate the complexity of an algorithm

1 visualizzazione (ultimi 30 giorni)
Max
Max il 5 Dic 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

Risposte (0)

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by