Borrar filtros
Borrar filtros

Problem of tensor extraction

1 visualización (últimos 30 días)
Hancheng Zhu
Hancheng Zhu el 26 de Dic. de 2021
Editada: Matt J el 27 de Dic. de 2021

Respuesta aceptada

Matt J
Matt J el 26 de Dic. de 2021
Editada: Matt J el 27 de Dic. de 2021
Perhaps this is what you want,
sub=repmat({':'},1,n);
sub(i)={1};
Y=W(sub{:});
  2 comentarios
Hancheng Zhu
Hancheng Zhu el 27 de Dic. de 2021
Nice code, bro. But the second line should be changed into sub{i} = l ;
Matt J
Matt J el 27 de Dic. de 2021
Editada: Matt J el 27 de Dic. de 2021
You're right, and I've edited the answer accordingly, but please Accept-click the answer if it provided what you needed.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos


Versión

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by