Subtract rows and Save the outputs in a new column

1 visualización (últimos 30 días)
Eslam Wafdy
Eslam Wafdy el 5 de Feb. de 2021
Respondida: madhan ravi el 5 de Feb. de 2021
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,

Respuestas (1)

madhan ravi
madhan ravi el 5 de Feb. de 2021
Use readtable(), diff() and finally writetable().

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by