Taking the last Row of each Double in a Cell

4 visualizaciones (últimos 30 días)
Fabio Taccaliti
Fabio Taccaliti el 17 de Jul. de 2022
Respondida: Githin George el 21 de Jul. de 2022
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
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

Categorías

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

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by