Subtract rows and Save the outputs in a new column

조회 수: 1 (최근 30일)
Eslam Wafdy
Eslam Wafdy 2021년 2월 5일
답변: madhan ravi 2021년 2월 5일
Hi every body,
I have a dataset excel CSV sheet with a three columns,(X,Y, and Z)
The first and second columns represents the coordinates of point, while the third one represents the elevations value of the point.
What i need is to subtract the first row from the second one and the second row from the third and the fourth from the fifth and the fifth from the sixth ….. etc. till the end of the data
The output should be saved on a fourth column (say output column)
And finally all the datasets to be saved to an excel file
Thanks A lot,

답변 (1개)

madhan ravi
madhan ravi 2021년 2월 5일
Use readtable(), diff() and finally writetable().

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by