How to create a table and change columns to rows and also give names

3 Ansichten (letzte 30 Tage)
C PRASAD
C PRASAD am 18 Aug. 2022
Kommentiert: C PRASAD am 19 Aug. 2022
I would like to generate 14*3 matrrix.i.e.rand(14,3)
I want the table to be named like this.How can I do this with the help of MATLAB

Antworten (1)

Walter Roberson
Walter Roberson am 18 Aug. 2022
YourMatrix = rand(4,3);
T = array2table(YourMatrix.', 'VariableNames', {'siddu', 'somu', 'ranu', 'bindu'})
T = 3×4 table
siddu somu ranu bindu _______ ________ _______ _______ 0.63077 0.56892 0.94093 0.54079 0.14092 0.086776 0.28633 0.46801 0.4597 0.98402 0.15847 0.27379

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by