필터 지우기
필터 지우기

how to make the size of 2 boards equal

조회 수: 1 (최근 30일)
aldo
aldo 2023년 8월 13일
댓글: aldo 2023년 8월 15일
in this pics you see the output i want to do
i've 2 table A and B
>> size(A)
ans =
560 2
>> size(B)
ans =
188 1
i want to use array2table(A,B) to create union and later plot the table in app designer using uitable
but it gives me error
T_=array2table(A,B)
Error using array2table
Wrong number of arguments.
this error because the tables have different dimensions.. How to add blanks to the second to match lengths?
  댓글 수: 3
Star Strider
Star Strider 2023년 8월 13일
Another option might be synchronize (Synchronize Timetables)
aldo
aldo 2023년 8월 13일
ok i try it

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

채택된 답변

Image Analyst
Image Analyst 2023년 8월 13일
If they have the same number of columns and you just want to stitch them together, one atop the other, try
AB = [A; B]
  댓글 수: 11
Image Analyst
Image Analyst 2023년 8월 14일
So is it all working now?
To stitch together horizontally you use commas and they all need to have the same number of rows.
To stitch together vertically you use semicolons and they all need to have the same number of columns. In addition, if the variables are tables, then I think the columns in the table must all have different field names.
There are a lot of "joining" table functions that may get around some of the restrictions I just mentioned above.
Sometimes it's better and easier to do stitching as regular double arrays before converting the array into a table. Just depends on exactly what you want to do (what output you want).
aldo
aldo 2023년 8월 15일
ok thanks

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

추가 답변 (0개)

카테고리

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