How to improve the speed of Matlab numerical integral?
    5 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Mazin Mustafa
 am 9 Okt. 2017
  
    
    
    
    
    Beantwortet: Jan
      
      
 am 10 Okt. 2017
            I am interested in computing numerical integrals in Matlab. My program evaluates multiple integrals using a "for loop". I need both accuracy and speed. So, I am using the Matlab function "quadgk". I am able to obtain the correct results but the program consumes a lot of time which makes it impractical to compute large scale problems. Do you have suggestions?
0 Kommentare
Akzeptierte Antwort
  Nicolas Schmit
    
 am 10 Okt. 2017
        If you have the parallel computing toolbox, you run can run your calculations in parallel using a parfor loop.
0 Kommentare
Weitere Antworten (1)
  Jan
      
      
 am 10 Okt. 2017
        What do you expect? There is no magic flag to increase the speed and no better function, which is not mentioned in the documentation.
Is your function to be integrated vectorized already? Did you reduce the number of expensive operations as far as possible (e.g. "2e-5" instead of "2*10^-5")? You want "accuracy and speed", but how much accuracy is sufficient? What about using integral?
For a more specific answer, post the relevant part of the code.
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


