Azzera filtri
Azzera filtri

import .txt files, convert into .xls and plot

12 visualizzazioni (ultimi 30 giorni)
Laura Paletto
Laura Paletto il 6 Lug 2018
Risposto: Nirav Sharda il 10 Lug 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

Risposte (1)

Nirav Sharda
Nirav Sharda il 10 Lug 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