Every 2 rows (2x2 matrix) to perform determinant calculation
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
cool dave
el 24 de Nov. de 2013
Comentada: cool dave
el 25 de Nov. de 2013
Hi all, can i know how to extract every two rows of my data to perform determinant calculation?
For example i have data:
1 2
3 4
5 6
7 8
9 10
11 12
so i want to select every two rows in order to perform determinant calculation, how can i do that? my final results should be:
-2
-2
-2
Regards,
0 comentarios
Respuesta aceptada
Más respuestas (2)
Azzi Abdelmalek
el 24 de Nov. de 2013
A=[1 2 ;3 4 ;5 6 ;7 8 ;9 10 ;11 12 ]
B=reshape(A',2,2,[])
out=arrayfun(@(x) det(B(:,:,x)),1:size(B,3))
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!