필터 지우기
필터 지우기

import .txt files, convert into .xls and plot

조회 수: 12 (최근 30일)
Laura Paletto
Laura Paletto 2018년 7월 6일
답변: Nirav Sharda 2018년 7월 10일
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

답변 (1개)

Nirav Sharda
Nirav Sharda 2018년 7월 10일
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.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by