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 views (last 30 days)
Show older comments
Dimitrios Gerontitis
on 15 Oct 2018
Commented: Stephen23
on 15 Oct 2018
EDIT: code attached as a file.
1 Comment
Stephen23
on 15 Oct 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:
Accepted Answer
madhan ravi
on 15 Oct 2018
Edited: madhan ravi
on 15 Oct 2018
More Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!