how to read text file and write same text file ?
Show older comments
Hello matlab community. I have this text file with me which i need to read. I have some experince to read structured data from text file but this file is very new to me.
can somebody of you help me to read this file ? and more thing i need to do here is i need to write the same file after some processing. so my 2nd question is how to write the same text file with same headers and values we alredy read !
(ps: the values may change after processing but as for now lets say i need to write same values)
* upper layer boundaries above ground in km
30.0
20.0
15.0
10.0
9.0
8.0
7.0
6.5
6.0
5.5
5.0
4.5
4.0
3.8
3.6
3.4
3.2
3.0
2.8
2.6
2.4
2.2
2.0
1.8
1.6
1.4
1.2
1.0
0.8
0.6
0.4
0.2
* number of layers
32
20
* Sa read in?
False
* scaling parameter for Sa matrix
0.5
* real elevation angle for zenith direction
0.001
* Sa correlation length in km
0.2
* input filename
"work0_O4//QDOAS.asc"
* surface albedo
0.06
* output directory path
"work0_O4/"
* temperature pressure filename
"work0_O4/temppress_data.txt"
* wavelength in nm
360.7731
* altitude in km
0.01
* cross section folder
"/home/iitm/Desktop/MMF_vlidort/TEST2/CONST/O4_298.xs"
* heights for apriori profile filename
"/home/iitm/Desktop/MMF_vlidort/TEST2/STINPUTS/apriori_heights.txt"
* vlidort config filename
"/home/iitm/Desktop/MMF_vlidort/TEST2/CONST/2p6_VLIDORT_ReadInput.cfg"
* aerosol ext t, unisotropy g, omega w
0.414
0.68
0.92
* apriori profile filename
"/home/iitm/Desktop/MMF_vlidort/TEST2/STINPUTS/aerosol_apriori.txt"
every sentence coming after * is a header.
Accepted Answer
More Answers (0)
Categories
Find more on Text Files 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!