2

I have 3 Matlab 1 coloumn arrays and I want to turn them into one 3 column array. How can I do this?

For example.

 A1 =     A2=    A3=

| 1 |   | 4 |   | 7 | 
| 2 |   | 5 |   | 8 |
| 3 |   | 6 |   | 9 |

I want the output to be:

Output = 

| 1 4 7 |
| 2 5 8 |
| 3 6 9 |

Thank you!

Found the answer, and it was very simple:

Output = [A1 A2 A3]

Thanks anyway!

1 Answer 1

2
B = horzcat(A1, horzcat(A2,A3))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.