I have a code with a for-loop where inside the for-loop there is a differential operator which uses a function, say A0, as input and performs
some operations and fthe results of the calculations are asigned to A0 again to be used for the next iteration. Intuitively, we understand that
the expressions in the for-loop get more and more complex at each iteration so that the computation time increases.
Long story short: In bellow I attach my code. The double for-loop (with tic and toc) becoms computationlly expensive
very when I increase J and K. I hope you have an idea to imrpve the speed of this code!
Thanks lot in advance!
syms x par1 par2 par3 par4 par5
muY(y)=-(y*(y*(y*(par1*y*par5^2 - par1*par2*par5) + par2*par3 + par1*par5^2) - par1*par2*par5))/(par2*par5*y^2 + par2*par5);