How to convert two arrays into a table?

131 views (last 30 days)
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

Vineeth Kartha
Vineeth Kartha on 3 May 2016
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
Gabriel Aviles
Gabriel Aviles on 18 May 2020
Hello! can I create a table with two arrays with different dimensions ?

Sign in to comment.

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!