MATLAB Answers

0

how to get the column names of one matrix and assign nan to them

Danielle Leblance さんによって質問されました 2018 年 2 月 8 日
最新アクティビティ Walter Roberson
さんによって 編集されました 2018 年 2 月 8 日
A=[A1,A2] ;
where A, A1,A2 are tables
I want to build matrix B such as:
B=[B1,A2];
but this time A2 is the same as A2 above but with nan values;
A2 is 300 columns and assigning the names column by column is a tedious thing to do .
Any help is appreciated

  4 件のコメント

Danielle Leblance 2018 年 2 月 8 日
B1 is another table that has the same size of A1 but with different variables
B1, A1, and A2 are imported from excel. The column names are automatically imported.
Image Analyst
2018 年 2 月 8 日
It's easier for us to try things and to help you if you attach your workbook and the code to read it in.
Bob Nbob
2018 年 2 月 8 日
If all you want is to have an array A2, that is the size of the original A2, but is a bunch of NaN, you should be able to say:
A3 = A2;
A3(:,:) = NaN;
That should get the size of A2 by copying, and then assign all members to be NaN.

サインイン to comment.

タグ

0 件の回答


Translated by