필터 지우기
필터 지우기

Problem in importdata function in Matlab version R2014a

조회 수: 1 (최근 30일)
abbas hasan
abbas hasan 2015년 6월 2일
Hi
am trying to open a text (sample.txt) file in MATLAB using importdata function. i use matlab version R2014a. when i use importdat it creats a cell variable, and i need a structure, the problem is , that i don't have this problm all time. I am use this function for several text files that contain inside the same information.
for example these the contents inside two different files:
File1:
"Data from BA_Background_00001.txt Node
Date: Mon Jun 01 11:21:08 CEST 2015 User: abc Spectrometer: MAYP112055 Autoset integration time: false Trigger mode: 0 Integration Time (sec): 5.484000E-2 Scans to average: 10 Electric dark correction enabled: true Nonlinearity correction enabled: false Boxcar width: 5 Stray light correction enabled: false XAxis mode: Wavelengths Stop averaging: false Number of Pixels in Spectrum: 2068 >>>>>Begin Spectral Data<<<<< 198.5 177 199 162 199.5 150 200 141 . . . . . . . ."
File 2:
Data from S_MAYP1120552_00001.txt Node
"Date: Mon Jun 01 11:24:04 CEST 2015 User: abc Spectrometer: MAYP112055 Autoset integration time: false Trigger mode: 0 Integration Time (sec): 5.484000E-2 Scans to average: 10 Electric dark correction enabled: true Nonlinearity correction enabled: false Boxcar width: 5 Stray light correction enabled: false XAxis mode: Wavelengths Stop averaging: false Number of Pixels in Spectrum: 2068 >>>>>Begin Spectral Data<<<<< 198.5 187 199 176 199.5 169 . . . . . ."
for the file 1 the importdat function open as struct, but for file 2, it is open as cell.
i dont know where the problem
i very appreciate any help

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by