Simulation in Matlab running too slow
Afficher commentaires plus anciens
My simulation in matlab is running too slow because it is asking me to preallocate. The problem is that I do not know the dimension of the matrix because I do not know how many iterations will require (and requires a lot). What can I do? Also, if someone knows how to keep instead of whole matrix only the last two values and updating in each iteration, due to I am using double integrator in my loop. Thanks!
7 commentaires
per isakson
le 4 Août 2018
Walter Roberson
le 4 Août 2018
How does this question differ from https://www.mathworks.com/matlabcentral/answers/413431-matlab-is-running-too-slow#comment_596397 ?
Alba Cuevas
le 4 Août 2018
KALYAN ACHARJYA
le 4 Août 2018
Do not post the multiple questions, if your question having sufficient information and relevant, definitely you will get the answer.
Now the question part, remove the loops by using other alternatives method.
Alba Cuevas
le 4 Août 2018
Walter Roberson
le 5 Août 2018
I see the other question is gone now. But if I recall correctly, the original version had code for us to look at. When there is no code for us to look at, we can only reply in generalities, such as per's reference to Non-deterministic pre-allocation.
Alba Cuevas
le 5 Août 2018
Réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!