Select particular elements from a cell array to form a matrix (double type)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Meng Li
el 28 de Jul. de 2021
Comentada: Meng Li
el 28 de Jul. de 2021
Dear all,
I have created a 2 by 2 cell array named "results". Each cell has multiple matrices or other types. I want to select the elements in the 17th row and the 1st column from every matrix of "endo_simul" in every cell "results{,}" and then form a matrix. Could anyone help me with it?
Thank you!
0 comentarios
Respuesta aceptada
Chunru
el 28 de Jul. de 2021
x = zeros(size(results));
for i=1:size(results, 1)
for j=1:size(results, 2)
x(i,j) = results{i,j}.endo_simul(17, 1);
end
end
Más respuestas (1)
Ver también
Categorías
Más información sobre Multidimensional Arrays 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!