Effacer les filtres
Effacer les filtres

Taking the last Row of each Double in a Cell

3 vues (au cours des 30 derniers jours)
Fabio Taccaliti
Fabio Taccaliti le 17 Juil 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.

Réponses (1)

Githin George
Githin George le 21 Juil 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

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by