How to convert two arrays into a table?

Suppose I have two different horizontal arrays of n elements in each array, and I want to put them in a table form with those two arrays as 2 columns in the table. How can I do this in Matlab?

 Accepted Answer

Hi,
If A and B are the arrays with n elements then you can create a table by the following command:
>> T=table(A,B)
Regards
Vineeth

2 Comments

Hello! can I create a table with two arrays with different dimensions ?

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!