3
$\begingroup$

given matrices

A = {{3, 10, 10, 5.`}, {4, 10, 10, 6.`}, {5, 10, 10, 7.`}}
B = {{6, 10, 10, 5.`}, {7, 10, 10, 6.`}, {8, 10, 10, 7.`}}

how can i get a matrix which has the combines the first column of A with the first coulumn of B and the last column of A? Resulting in

C = {{3,6, 5.`}, {4,7, 6.`}, {5,8, 7.`}}

Thanky you in advance for any assistance

$\endgroup$
4
$\begingroup$

just try

 Transpose@{First/@A,First/@B,Last/@A}    

or

 Transpose@{A[[All,1]],B[[All,1]],A[[All,4]]}

{{3, 6, 5.}, {4, 7, 6.}, {5, 8, 7.}}

$\endgroup$
  • $\begingroup$ Than you very much $\endgroup$ – Andreas Apr 20 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.