Hi i am Dimitrios Gerontitis i have already written a function for a matrix A which i use to a system Ax=b where x is the unknown vector which inludes Fourier Coefficients. So i want to ask how i can fix my code to take my resuts faster

2 visualizaciones (últimos 30 días)
EDIT: code attached as a file.
  1 comentario
Stephen23
Stephen23 el 15 de Oct. de 2018
"So i want to ask how i can fix my code to take my resuts faster"
You provided us with more than one hundred lines of code, many lines of which are more than 200 columns wide, and the whole code contains nearly 12,000 characters. The point is that it is not exactly simple code, and there are probably multiple ways that you could improve your code.
So you should learn how to write efficient code:
Judging by a quick overview, you definitely need to learn about preallocation and vectorization:

Iniciar sesión para comentar.

Respuesta aceptada

madhan ravi
madhan ravi el 15 de Oct. de 2018
Editada: madhan ravi el 15 de Oct. de 2018
Read about preallocation
  3 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by