how to import multiple .tec files
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi. I hope some of you have time to help me with that case: I am trying to import some .tec files with 60 and 400 line header. So it is like, 2 different matrix which I want to import from the same file. I have 30 files like this. The point is, i want to save from each file two different vectors, which are cp_s and cp_d. By the way I am using "reshape" because i have to convert the matrix which I have from .tec file in a vector. The codes I have written are:
clear all
for i=10000:1:10100;
test(i)=importdata(sprintf('DU08-W-180_%05d.tec',i),' ',60);
test2(i)=importdata(sprintf('DU08-W-180_%05d.tec',i),' ',400);
%Saug(i)=reshape(test.data.',1,[]);
%Druck(i)=reshape(test2.data.',1,[]);
%x_s(i)=Saug(1:97);
%x_d(i)=Druck(1:97);
%cp_s(i)=Saug(874:970);
%cp_d(i)=Saug(874:970);
end
I have this error at the end>Field reference for multiple structure elements that is followed by more reference blocks is an error.
댓글 수: 3
Moses Joseph
2020년 10월 28일
Greetings.
I have similar issue. I have over 100 .std files in which each of them has 10 headers and each header has 24 hours data of which each hour has 60 values. I want to loop through the hundred data files and get the average of the 24hrs data with graphs.
I was only able to do for each data at a time and it's very tedious.
Mathieu NOE
2020년 10월 28일
hi
@ Joseph : in the future , please create your own request - otherwise it's going to be messy here if we address multiple questions.
Other than that maybe a few files + a description of how you 'd like to post process your data would be helpful
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!