フィルターのクリア

Creating table with scalars in one column and vectors in another

3 ビュー (過去 30 日間)
Yonathan Zarkovian
Yonathan Zarkovian 2022 年 5 月 1 日
コメント済み: Star Strider 2022 年 5 月 4 日
Hi,
I'd like to create a table that contains scalars in the first column and vectors (arrays) in the second column. For example:
However, MATLAB will only let me add tables or cell arrays into an existing table.
I'd appreciate your help.
Thanks.

採用された回答

Star Strider
Star Strider 2022 年 5 月 1 日
Try something like this —
theta = [30; -15];
Dm = [1 0 -1; 0 0 -1];
Data = table(theta, Dm)
Data = 2×2 table
theta Dm _____ _____________ 30 1 0 -1 -15 0 0 -1
.
  2 件のコメント
Yonathan Zarkovian
Yonathan Zarkovian 2022 年 5 月 4 日
Thank you!
Star Strider
Star Strider 2022 年 5 月 4 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by