Creating table with scalars in one column and vectors in another
조회 수: 5 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
Star Strider
2022년 5월 1일
Try something like this —
theta = [30; -15];
Dm = [1 0 -1; 0 0 -1];
Data = table(theta, Dm)
.
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!