modify a data file using MATLAB?
Show older comments
Hi guys,
I am a beginner of MATLAB. Now I have a series of data files output from Openfoam, in terms of different time step (shown in floowing figure). A

and under each folder I have the data included in the file like below. However I only need the column of x and p for each file.

I would like to integrate the files in one separate file and add a second colum between x and p, by t (t=0.5, 1, 1.5 ....)., shown in following format. I have no experience of modyfing a file. Could you please give me some tips, thanks a lot.
%x t value
0 0.5 3000
1 0.5 3200
...
20 30 3690
2 Comments
Mathieu NOE
on 28 Jun 2021
hello
could you share some of the data file ?
tx
kimy
on 28 Jun 2021
Accepted Answer
More Answers (0)
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!