Azzera filtri
Azzera filtri

vectorize without using loop

1 visualizzazione (ultimi 30 giorni)
Eric
Eric il 18 Mar 2013
I believe there's way to vectorize the following code without using the loop
for i = 1:length(indtrn)
Xtrn(i, :) = X(indtrn(i), indtrn);
end
Can someone shed me some light? Thanks in advance.

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 18 Mar 2013
out=X(indtrn,indtrn)

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by