How to save variable and use in future code?
Ältere Kommentare anzeigen
Good afternoon! I have a problem using the factorial function. This function is called more than 1 million times during the entire code. Due to the large number of identical operations, I get a time for all factorial operations of about 60 seconds. I want to speed this up by calculating the factorial from 1 to 100 once and then returning the value from the resulting vector. How can I do this most effectively?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Calculus finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


