How to extract a matrix from a series matrix in matlab?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
yang-En Hsiao
el 9 de Feb. de 2019
Comentada: Stephen23
el 9 de Feb. de 2019
How to extract a matrix from a series matrix in matlab? I mean
F_1,F_2,F_3 and F_4 are all 4*4 square matrix,now i want to extract F_2 from the F_K,what is the code should i write? F_K(2)?
F_K=[F_1 F_2 F_3 F_4];
0 comentarios
Respuesta aceptada
madhan ravi
el 9 de Feb. de 2019
Store it as a cell array:
F_K={F_1 F_2 F_3 F_4};
% ^---------------^---- note the brackets
F_K{2}
1 comentario
Stephen23
el 9 de Feb. de 2019
Or, keeping the data in a numeric array:
A = cat(3,F_1,F_2,F_3,F_4);
A(:,:,4)
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing 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!