필터 지우기
필터 지우기

how can i open my files?

조회 수: 1 (최근 30일)
cemsi888
cemsi888 2015년 2월 13일
댓글: Image Analyst 2015년 2월 24일
hi everybody today i have one question too!! i use fopen function to open my Experiment datas. but the Name and Extension of files vary from each other. could you give me informations have can i read all files automatically.Inaddtion beginning of files Name differs from each other too. example: msa02_141121_mscc5_11.erg m4_cst_cc3_150206_01.e00 and here is my code too in order to read first file. As you can guess i have maybe more than 1000 files so i want to read them in Loop..
clear all
clc
delimiter=';' ;
headerLines=4
formatSpec1 = '%s%s%s%s%s%[^\n\r]'
daten=fopen('msa02_141121_mscc5_11.erg','r')
zeile = textscan(daten,formatSpec1,181,'delimiter',';','headerLines',4)
fclose(daten);

채택된 답변

Image Analyst
Image Analyst 2015년 2월 13일
Use dir(), or sprintf() depending on what you know or don't know and how you want to do it. Code samples are in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
  댓글 수: 39
cemsi888
cemsi888 2015년 2월 24일
for first question why occurs cell when i choose 2 files and why does not occur cell when i choose 1 file.
Image Analyst
Image Analyst 2015년 2월 24일
It needs to send back a cell array when there's a list of strings because all the strings may not be the same size. If there's just one I'd guess it's a string because that's a lot simpler and no cell array is required.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by