Can I insert columns into imported data
조회 수: 1 (최근 30일)
이전 댓글 표시
I am importing data from an excel file and would like to subtract sequential rows or columns (for example) Can I do this?
댓글 수: 0
답변 (2개)
Isabella Osetinsky-Tzidaki
2016년 12월 8일
use diff function, see its help page for right formulation
댓글 수: 0
Walter Roberson
2016년 12월 8일
You can use {} notation using : (colon) for the row numbers and using numeric values for column numbers. You can even
diff(YourTable{:, :}, [], 2)
to find the difference between adjacent columns.
What I do not know at the moment is whether there is a nice way to rearrange columns. You can probably use
YourTable(:, [3 1 4 2])
for example to rearrange columns including header.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!