Borrar filtros
Borrar filtros

vectorize without using loop

1 visualización (últimos 30 días)
Eric
Eric el 18 de Mzo. de 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.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 18 de Mzo. de 2013
out=X(indtrn,indtrn)
  1 comentario
Eric
Eric el 19 de Mzo. de 2013
exactly. Thank you, Azzi.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by