how to copy values from one table to other table
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
I have a table with a columns of say 10 values from 1 to 10 and I have an array of 5 values with values as 2, 4, 6, 7,8. How do i create a new column in the table which will copy the data from the array match with the table values and fill Nan on those values which are not same?
Like this
New_row
Nan
2
Nan
4
Nan
6
7
8
Nan
Nan
댓글 수: 0
답변 (3개)
madhan ravi
2019년 4월 10일
편집: madhan ravi
2019년 4월 10일
T1=table((1:10).');
T2=table([2, 4, 6, 7, 8].');
outerjoin(T1,T2)
Shambhavi Adhikari
2019년 4월 10일
댓글 수: 1
madhan ravi
2019년 4월 10일
편집: madhan ravi
2019년 4월 10일
You have problems with copying the code correctly. Go back, copy my answer and paste it in the command window.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!