Editing and saving iterations .csv files

I am trying to solve an optimization problem. This involves reading in a input.csv input file to another program that goes through some calculations. This input file consists of a few rows of headers (strings and numbers), followed by the data. The data is organized into 4 columns: t, x, y, z. For my purposes, I needed to
1) Read in the z column from the orginal .csv input file
2) Iterate on those values.
3) Edit the original file, and replace the z column.
4) Save that new edited version of the edited_input.csv file, with a different (iterating) file name. In order for this new edited_input.csv file to work , it needs to contain all the original headers.
I've figured out steps 1 & 2. I am able to read in the data values from the original .csv file. I have edited the Z column, and saved that array as a new variable. The difficulty I am having is steps 3 & 4. Can someone please point me into the right direction?

답변 (0개)

카테고리

질문:

2016년 2월 7일

편집:

2016년 2월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by