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

조회 수: 3 (최근 30일)
C PRASAD
C PRASAD 2022년 8월 18일
댓글: C PRASAD 2022년 8월 19일
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

답변 (1개)

Walter Roberson
Walter Roberson 2022년 8월 18일
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
  댓글 수: 1
C PRASAD
C PRASAD 2022년 8월 19일
Tq for the answer but I need the first column to with names I mentioned in the table

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by