Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Considering a 3D matrix of generic dimension n. How to delete the first column of the first matrix, the second column of the second matrix, the third column of the third matrix, and so on.

1 visualización (últimos 30 días)
% Considering 3D matrix of dimension n
n=3;
for a=1:n
for b=1:n
for c=1:n
A(b,c,a)=c;
end
end
end

Respuestas (2)

KSSV
KSSV el 21 de Nov. de 2017
% Considering 3D matrix of dimension n
n=3;
for a=1:n
for b=1:n
for c=1:n
A(b,c,a)=c;
end
end
end
%%To delete
iwant = zeros(size(A,1),size(A,2)-1,n) ;
for i = 1:n
iwant(:,:,i) = A(:,setdiff(1:n,i),i) ;
end

Image Analyst
Image Analyst el 21 de Nov. de 2017
I'm closing this one since it's a duplicate question.

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by