Borrar filtros
Borrar filtros

import .txt files, convert into .xls and plot

12 visualizaciones (últimos 30 días)
Laura Paletto
Laura Paletto el 6 de Jul. de 2018
Respondida: Nirav Sharda el 10 de Jul. de 2018
Hi, I am quite new in matlab and I am not sure how to overcome this. I explain. I have a certain amount of .txt files (e.g. 400) that come out from a post-processing image spectroscopy. I'd like to import these into matlab, convert and save them as excel files and also plot them. I tried importdata and xlswrite but apparently I am doing something wrong as I cannot manage to convert into xls. Also, is it possible to import them all but then have them all within the same excel worksheet? Any suggestions? Thank you

Respuestas (1)

Nirav Sharda
Nirav Sharda el 10 de Jul. de 2018
You can use ' readtable ' or ' textscan ' to read .txt files into a Table or Cell-Array. You can then use ' writetable ' to write it to Excel file. The 'writetable' function allows you to write to a specific sheet and range. You can utilize it to write data from all .txt file to one .xls sheet. I hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by