필터 지우기
필터 지우기

Calculate the complexity of an algorithm

조회 수: 3 (최근 30일)
Max
Max 2012년 12월 5일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by