How to create a Nx3 array from Nx4 array
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Amadeus Xu
el 27 de Nov. de 2020
Comentada: Ameer Hamza
el 27 de Nov. de 2020
Hi all,
If I have a 100x1 cell array which contains 100 Nx4 double array where N is a variable size, how to I create a new cell array which is also 100x1, but contains a Nx3 double array that contains just columns 2,3 and 4 of the previous Nx4 array?
Hope that make sense! I'd appreciate any help with this problem.
Thanks in advance!
0 comentarios
Respuesta aceptada
Ameer Hamza
el 27 de Nov. de 2020
You can use cellfun()
C1; % 100x1 with Nx4 matrices
C2 = cellfun(@(x) {x(:,2:end)}, C1);
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!