MATLAB Answers


Combine vectors of different dimensions to a table

Shashank Bhatia さんによって質問されました 2019 年 11 月 9 日
最新アクティビティ Shashank Bhatia さんによって コメントされました 2019 年 11 月 13 日 6:06
Dear Mathworks Community,
I have 380 vectors each with same column (1) but with little different number of rows e.g. 18000*1 or 18001*1 or 17999*1.
How to combine all into table?
I tried T=table(APP,PSS,TSS,VUU,...,....,.... ...);
But error:
All variables must have the same number of rows.
Looking various ways to combine them.
Help much appreciated.

  0 件のコメント

サインイン to comment.


1 件の回答

回答者: Nikhil Sonavane 2019 年 11 月 12 日

You can try padding the arrays with 0 or NaN so that all arrays are of same size and the combine them as required

  1 件のコメント

Shashank Bhatia 2019 年 11 月 13 日 6:06
Thanks Nikhil for suggestion. Do you mean to suggest create table with 0 or NaN of row*column 18001*380 and then fill the table whereever entries are?
Can you suggest the code?

サインイン to comment.

Translated by