Please help to vectorize this for loop
Afficher commentaires plus anciens
Dear all,
I would like some help in vectorizing this for loop:
k=1; for i=6:5:121;
R(:,k)= rawdata{1,i};
MF(:,k)= rawdata{1,i+1};
QF(:,k)=rawdata{1,i+2};
SF(:,k)=rawdata{1,i+3};
k = 1+k;
end
The rawdata is in the form of cell arrays within cell arrays, I have attached a screenshot of how it looks. The end results for R, MF, QF and SF is a table with what is extracted from the rawdata. I want to find a way to remove this for loop and I read that vectorization is a way of optimize for loops.
Thank You,
M
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements 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!