Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
When merging two tables, then restart the number of rows
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey
I have merged two tables. Is it possible to restart the number of rows when the second table is placed under the first on. The row is not a part of the table. It's the tables rownumber in matlab
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/250887/image.png)
What I want to do in matlab. Example:
![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/250891/Capture.png)
댓글 수: 0
답변 (1개)
Guillaume
2019년 11월 27일
No, as you've stated the row number is not part of the table, it's only there to help you in case you need to index the table rows and thus will always go from 1 to the number of rows in the table.
If you want a special identifier for each row, then you'll have to explicitly add that identifier (which you can call RowNumber if you wish) as a table variable.
mergedtable.RowNumber = [1:height(firsttable), 1:height(secondtable)].';
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!