Taking the last Row of each Double in a Cell
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have a cell Coordinates (100x3) with inside all 14x8 double.
From these I would like to select all the doubles in the second column of the cell.
And to build a vector y_final than contains in each row the last row of all the doubles previously selected.
How can I do it?
Thanks in advance.
Respuestas (1)
Githin George
el 21 de Jul. de 2022
Hi Fabio,
I understand you want to create a matrix - each row containing the last row of the 14x8 double in the 2nd column of the Cell.
I believe the following code snippet will give the desired output.
y_final= []
for i = 1:100
% temp contains the 14x8 double in 2nd column of the cell C
temp = C{i,2};
% appending 14th row of temp to y_final
y_final = [y_final; temp(14,:)];
end
0 comentarios
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices 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!