MATLAB: In matlab coding how to write Big-O notation

big oMATLAB

e=O(log(n))

Best Answer

MATLAB in general has no concept of Big-O notation, and cannot compute it or use it.
The closest that MATLAB gets to this is that inside the MuPAD symbolic engine, series are represented with an order term, such as
1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120 + O(x^6)
This is related to big-O notation in that both have to do with order approximations, but the symbolic engine use does not have to do with code complexity in either time or space.
Related Question