When I repetitively call the COEFFS function with the same inputs, I find that after a certain number of iterations, the order of the results change. This can be observed using the following code:
clear maplemexsyms x;f = taylor(exp(x), 20);for ii=1:150 t = coeffs(f); %%%Method to identify incorrect order %%%
X = sort(t);[y i]=ismember(X,t); if any(diff(i)>0) disp(sprintf('Unsorted order after %d iterations',ii)); keyboard endend
For this example, I find the results are returned in a different order after 42 iterations.
Unsorted order after 42 iterations
Best Answer