M
M
mart kurtz2019-05-28 17:52:38
MATLAB
mart kurtz, 2019-05-28 17:52:38

How to convert iterative loop to vectorized operation in matlab?

Dear colleagues, I ask for your advice!
there is an extremely simple loop written in matlab:
Fi(1) = 0
for k = 2:N
Fi(k) ~ F(k-1)......
end
the problem is that N = 10^7. ..10^8 and everything is considered to be very long.
To speed up I try parfor, but there was a problem: it is impossible to calculate the current value without calculating the previous result Fi(k) ~ F(k-1). Therefore, the question arises: is it possible to rewrite the iterative cycle in vector form? And if so, how?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question