Reorganization of experimental data

조회 수: 2 (최근 30일)
Daniele Sonaglioni
Daniele Sonaglioni 2021년 7월 30일
댓글: Star Strider 2021년 8월 2일
Hello everybody,
I have a problem with the reorganization process of my experimental data.
Attached there is an example of a typical data set
0 0 -93.964 -0.00976171
1 0.001 -93.964 -0.00976627
2 0.002 -93.965 -0.00991459
3 0.003 -93.965 -0.00997991
4 0.004 -93.963 -0.0100311
5 0.005 -93.962 -0.0101206
6 0.006 -93.964 -0.0101955
7 0.007 -93.961 -0.0098519
8 0.008 -93.958 -0.00946246
9 0.009 -93.945 -0.00970383
10 0.01 -93.921 -0.0105877
11 0.011 -93.884 -0.0125595
12 0.012 -93.829 -0.015714
13 0.013 -93.755 -0.0194494
Results:
Sample:
2021_07_29_cool_variab_heat_fix_59603. 100.0000e-06 mg
Curve Name:
]61[&2021_07_29_cool_variab_heat_fix_59603
Curve Values:
Index t Ts Value
[s] [°C] [mW]
0 0 -93.205 -0.000370132
1 0.01 -93.365 -0.00237034
2 0.02 -93.578 -0.00514436
3 0.03 -93.713 -0.00678095
4 0.04 -93.800 -0.00771421
5 0.05 -93.857 -0.00846012
6 0.06 -93.893 -0.00883113
7 0.07 -93.917 -0.00909422
8 0.08 -93.932 -0.00928991
9 0.09 -93.944 -0.00943325
10 0.1 -93.949 -0.00949218
11 0.11 -93.954 -0.00950072
12 0.12 -93.957 -0.00963767
13 0.13 -93.958 -0.0096308
14 0.14 -93.960 -0.00962155
15 0.15 -93.961 -0.00964608
Results:
Sample:
2021_07_29_cool_variab_heat_fix_59603. 100.0000e-06 mg
________________________________________________________________________________
Not signed STARe SW 16.10
I want to remove all the written texts and empty lines and I want to reorganize the blocks of data in a way to invert their order.
Do you have any suggestion?
  댓글 수: 1
Star Strider
Star Strider 2021년 7월 30일
Attach a ‘typical data set’ as a .txt or .mat file.

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

채택된 답변

Star Strider
Star Strider 2021년 7월 30일
편집: Star Strider 2021년 8월 1일
The data file you attached does not appear to bear a strong resemblance to the data file you quoted.
I chose to use textscan here because I have experience using it with files with interrupted formats, however this file appears to have no interruptions:
fidi = fopen('typical_data_set.txt','rt');
C = textscan(fidi, '%f%f%f%f %*f%*f%*f%*f%*f%*f', 'HeaderLines',1, 'CollectOutput',1);
fclose(fidi);
M = cell2mat(C);
Here ‘M’ is a (44006x4) double array.
A file with interruptions would simply require a while loop to loop through it, saving the individual sections. For an example, see: How to skip lines of Data in the middle of a text file . I believe that file was similar to the one you quoted.
EDIT — (1 Aug 2021 at 00:15)
Removed the generic code example. Nothing else changed.
.
  댓글 수: 14
Daniele Sonaglioni
Daniele Sonaglioni 2021년 8월 2일
I have just earned my master degree in condensed matter physics and I am now focusing in soft matter physics, especially in the physics of proteins. In particular, I am specialized in differential scanning calorimetry.
Your field is very interesting: I also want to make some research in the medical field although you are more interested on "large scale" phenomena while I prefer smaller scales.
I think that coding is very useful in every field of study, not only physics and I am trying to lear as much as possible to make deeper data analysis to better understand what I am studying.
Star Strider
Star Strider 2021년 8월 2일
Interesting!
I wish you the best in your research!

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

추가 답변 (1개)

Daniele Sonaglioni
Daniele Sonaglioni 2021년 7월 30일
Here you are: this is a typical data set of mine.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by