필터 지우기
필터 지우기

How to automatically run a matlab script on data in a seperate file on your computer?

조회 수: 1 (최근 30일)
Hello,
I have data (.txt file) incoming on an sd-card inserted in my computer. At the moment I open the .txt file on excel and save it as a .xlsx file in my Matlab folder and write an xlsread() line at the top of my script. Is there any way to shorten this process or even make it happen fully automatically?
Thanks

채택된 답변

Koundinya
Koundinya 2018년 12월 12일
Data from the .txt file can be directly read in MATLAB without converting it to .xlsx file, depending on the kind of data it contains :
If the your data is in the form of tables, you could use readtable, to read the text-file directly,
If the .txt file contains data in csv format or is delimeted by some character, you could use csvread or dlmread. Take a look at these examples in the documentation.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by