How to create a column table

3 ビュー (過去 30 日間)
Felvie Valerie Leong
Felvie Valerie Leong 2021 年 2 月 3 日
編集済み: Stephen23 2021 年 2 月 8 日
how to change the table so the number is in column straight down? I attach a picture on how it should be
vel=linspace(60,140,5);
time=[1:0.5:3];
table(time,vel,'VariableNames',{'Time','Velocity'})
ans =
1×2 table
Time Velocity
_____________________________ ______________________________
1 1.5 2 2.5 3 60 80 100 120 140

採用された回答

VBBV
VBBV 2021 年 2 月 3 日
vel=linspace(60,140,5);
time=[1:0.5:3];
table(time.',vel.','VariableNames',{'Time','Velocity'})
Use transpose .' operator
  2 件のコメント
Felvie Valerie Leong
Felvie Valerie Leong 2021 年 2 月 7 日
Thank you so much!
Stephen23
Stephen23 2021 年 2 月 8 日
編集済み: Stephen23 2021 年 2 月 8 日
Using the colon operator is more robust than using transpose.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by