Filter löschen
Filter löschen

Calculate the complexity of an algorithm

1 Ansicht (letzte 30 Tage)
Max
Max am 5 Dez. 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

Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by