Consider preallocating for speed

2 vues (au cours des 30 derniers jours)
Tom
Tom le 13 Fév 2014
Modifié(e) : per isakson le 13 Fév 2014
Hello,
My lengthy program is littered with 'Consider preallocating for speed' suggestions for numerous variables.
What does a more experienced programmer do to circumvent this? Do I really need to allocate space at the start for every variable which this is suggested for?
Kind regards,
Tom

Réponses (1)

per isakson
per isakson le 13 Fév 2014
  2 commentaires
Tom
Tom le 13 Fév 2014
That was pretty much what I thought. However I'm getting:
Subscripted assignment dimension mismatch.
Any idea what I'm doing wrong?
per isakson
per isakson le 13 Fév 2014
Modifié(e) : per isakson le 13 Fév 2014
Dimension of left and right hand side must agree for existing variables(??)
Show a line, which causes this error.
The Mathworks server is choked?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by