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

조회 수: 1 (최근 30일)
Danielle Leblance
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
Image Analyst
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 Thompson
Bob Thompson 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.

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

답변 (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