Simulation in Matlab running too slow
古いコメントを表示
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 件のコメント
per isakson
2018 年 8 月 4 日
Walter Roberson
2018 年 8 月 4 日
How does this question differ from https://www.mathworks.com/matlabcentral/answers/413431-matlab-is-running-too-slow#comment_596397 ?
Alba Cuevas
2018 年 8 月 4 日
KALYAN ACHARJYA
2018 年 8 月 4 日
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
2018 年 8 月 4 日
Walter Roberson
2018 年 8 月 5 日
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
2018 年 8 月 5 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!