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!