Creating Tables in Matlab

조회 수: 2 (최근 30일)
Nay Rein
Nay Rein 2015년 12월 24일
답변: Image Analyst 2015년 12월 24일
Hello everyone!!! I'm very new matlab user. Could you pleas someone tell me how to create table in matlab. I have 6 points for X_axis, and 12 points for Y_axis. For example,
x=[1;2;3;4;5;6];
y=[1 2 3 4 5 6 7 8 9 10 11 12]
In this eg. x1 is corespondent to y1 and y2, x2 is corespondent to y3 and y4... so on ....
With big respect. Thank you.

답변 (1개)

Image Analyst
Image Analyst 2015년 12월 24일
See the table() function. You cannot have a table where one column is a row vector of 6 entries and another is a column vector of 12 entries. They both have to be column vectors of the same number of entries, like:
x=[1;2;3;4;5;6];
y=[7; 8; 9; 10; 11; 12]
t = table(x, y)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by