Converting an .m file to .mat file and plot the graph
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Victor
el 6 de Jun. de 2014
Comentada: Victor
el 6 de Jun. de 2014
I have 7 .ini files with content such as:
[text1]
1 = 500
2 = 400
3 = 600
4 = 700
and I want to take the number on the right side of the equal sign for each file and put them in individual columns. so i would have the index 1-n on one column and 7 separate columns of data extracted from those 7 .ini files. I would also like to do all this in a .mat file so i can plot the data afterwards.
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 6 de Jun. de 2014
To read your text file
fid=fopen('file.ini')
s=textscan(fid,'%s %s %s')
fclose(fid)
out=str2double(s{3})
Más respuestas (0)
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!