Filter löschen
Filter löschen

vectorize without using loop

1 Ansicht (letzte 30 Tage)
Eric
Eric am 18 Mär. 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.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 18 Mär. 2013
out=X(indtrn,indtrn)
  1 Kommentar
Eric
Eric am 19 Mär. 2013
exactly. Thank you, Azzi.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by