Hey everyone,
I know this has been discussed in the community quite often, but after going through the answers for four hours know, I still havent found a way to handle my problem, so i would be very thankful if someone of you guys could help me out! I have data which looks like this and which is separated by two spaces:
if i try to import it with the following code (I've already tried it with readmatrix, it doesn't work):
clear all
clear
filename=uigetfile('*.dat');
A=readtable(filename,'Delimiter','\t');
I know get a table with the format 370x1, which is useless to me, because I am trying to do a surf plot with all the numeric data on the right. The Table I get looks like this:
I would be really glad If somebody could help me out, because right now, I am prepreparing the data in excel, and the plot and everything else works perfectly fine, but I would like to it directly with the dat file!
Thank you in advance and best regards from germany, Lukas

댓글 수: 8

Cris LaPierre
Cris LaPierre 2021년 2월 2일
It would be easier to propose a solution if you shared your data file. You can attach it using the paperclip icon. If it doesn't like the extension, either zip your file or change the extentsion to txt.
Have you looked into readtable using fixedWidthImportOptions?
ga97cad
ga97cad 2021년 2월 2일
Hey Chris!
thank you for quick reply! I have attached the file to the answer! As I meansioned before, I am trying to do surf plot with all the data on the right, which works perfectly in matlab but only with preparing the data priorly with excel...
best regards, Lukas
ga97cad
ga97cad 2021년 2월 2일
and i also stumbled upon your proposed option fixedWidthImportOptions before, but I didn't help with my problem unfortunetly....
The file is badly-formed -- there are not the same number of elements in every record -- and it's not delimited but fixed width. What do you want done with the missing values?
>> fid=fopen('tex_file.txt','r'); % open a file handle
>> fgetl(fid); % skip header line
>> l1=fgetl(fid); % get first record
>> strfind(l1,'0.0') % locate the floating pt zero
ans =
23 29 36 316 323 330 337
>> V1=str2double(split(l1(23:end))); % decocde all values from there to end record
>> l2=fgetl(fid); % repeat above for next record
>> V2=str2double(split(l2(23:end)));
>> [V1(1:5) V2(1:5)].' % show we got the right values for beginning of records
ans =
0 0.0100 0.0500 0.1700 0.5400
0 5.7200 16.2100 30.8100 31.7500
>>
>> whos V1 V2 % and show what actually was in the two records
Name Size Bytes Class Attributes
V1 46x1 368 double
V2 30x1 240 double
>>
As the last shows, there are 16 more values in the first record than the second; it appears at a glance there are a whole lot of different records lengths scattered throughout the file. That's ok in a spreadsheet, "not so much" in an array. That's the root cause of the problem in importing the file as it is.
So,the Q? is, what is to be done about the missing values?
ga97cad
ga97cad 2021년 2월 2일
Hey dpb!
Thank you for your detailed answer, but your propesed code is not working in my case. I tried it and it only gives me an empty array (also with the 'E2' option).
I have try the detectImportOption it only gives me this:
DelimitedTextImportOptions with properties:
Format Properties:
Delimiter: {':'}
Whitespace: '\b\t '
LineEnding: {'\n' '\r' '\r\n'}
CommentStyle: {}
ConsecutiveDelimitersRule: 'split'
LeadingDelimitersRule: 'keep'
EmptyLineRule: 'skip'
Encoding: 'UTF-8'
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
ExtraColumnsRule: 'addvars'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'Var1', 'Var2', 'Var3'}
VariableTypes: {'char', 'double', 'char'}
SelectedVariableNames: {'Var1', 'Var2', 'Var3'}
VariableOptions: Show all 3 VariableOptions
Access VariableOptions sub-properties using setvaropts/getvaropts
PreserveVariableNames: false
Location Properties:
DataLines: [2 Inf]
VariableNamesLine: 0
RowNamesColumn: 0
VariableUnitsLine: 0
VariableDescriptionsLine: 0
To display a preview of the table, use preview
I think that the deliminter {':'} is completely useless as it is acuallty a double space. Same goes for the Variable Names 1, 2 and 3 which are too few. As I meantioned before, if i prepare it with excel and then create a csv file with semicolon as a delimitor, it gives me table with 49 variables (as desired), like in the picture below:
Is there maybe a way to insert semicolons into the file via matlab and then afterwads open it? So that it is possbile to skip the excel staff. Maybe with writematrix (I already tried it but it didn't work with my obviously poor skills)?
best regards, Lukas
Adam Danz
Adam Danz 2021년 2월 2일
I don't see the attachment.
ga97cad
ga97cad 2021년 2월 2일
submitted my question while your were uploading your's obviously... oh my god.... that looks really complicated! thanks for putting so much effort in for helping out! I much appreciate it!!! The data with the missing values shall be ignored, that plot should in the end look like the file i have attached to the answer (with the excel prepared data).
I never thought that this would be sooo comlicated with matlab, as it is so easy to plot everything with the prepared excel data.
Is there no way to change the double space in the file with an semicolon via writematrix? and then read out the overwritten matrix with the inserted semicolons via readmatrix or readtable?
best reagrds, lukas
ga97cad
ga97cad 2021년 2월 2일
the mentioned prepared excel file looks like the file I have attached to the answer, and reading it out with readtable(filename) works perfectly fine. That is why I am asking how I
  1. either change the two spaces into a smicolon (writematrix) and then read it out
  2. or treat the doublespace as the delimintor and then read it out
thanks, Lukas

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

 채택된 답변

Cris LaPierre
Cris LaPierre 2021년 2월 2일
편집: Cris LaPierre 2021년 2월 2일

1 개 추천

My suggestion would be to use the Import Tool. This will allow you to interactively create your import. There is an option to generate an import script or function as well.
Along the way, you get to inspect your data. In particular, you will notice that you have an inconsistent number of columns of data. This is going to possibly complicate creating a surface from the data, though not necessarily. The shorter rows will be padded with NaN.
I was able to successfully import the data using both the Import Tool and fixedWidthImportOptions.
numVars = 48;
opts = fixedWidthImportOptions("NumVariables",numVars,...
"DataLines",2);
opts = setvartype(opts,1,"datetime");
opts = setvartype(opts,2:numVars,"double");
opts = setvaropts(opts,1,"InputFormat","dd.MM.yyyy HH:mm:ss");
opts.VariableWidths = [19 2 4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7];
data = readtable("tex_file.dat",opts)
From the the table, you could create a surf using the following code. For additional details on accessing data in a table, see this page.
surf(data{:,2:end})

댓글 수: 1

ga97cad
ga97cad 2021년 2월 2일
Wow! It worked! Thank you so much for your help, Chris!!! Wouldn't have been able to find a solution like that within 50 years...
best regards, Lukas

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

추가 답변 (1개)

dpb
dpb 2021년 2월 2일
편집: dpb 2021년 2월 2일

0 개 추천

The phone rang...and Chris got back first, but my next response was to be--
opt=detectImportOptions('tex_file.txt','FileType',"fixedwidth",'NumHeaderLines',1);
opt.VariableTypes(1)={'datetime'};
opt=setvaropts(opt,"Var1","InputFormat",'dd.MM.yyyy');
tA=readtable('tex_file.txt',opt);
tA.Date=tA.Var1+tA.Var2;
tA.Date.Format='default';
tA=[tA(:,end) tA(:,3:end-1)];
which leaves a table looking like:
>> head(tA)
ans =
8×48 table
Date Var3 Var4 Var5 Var6 Var7 Var8 Var9 Var10 Var11 Var12 Var13 Var14 Var15 Var16 Var17 Var18 Var19 Var20 Var21 Var22 Var23 Var24 Var25 Var26 Var27 Var28 Var29 Var30 Var31 Var32 Var33 Var34 Var35 Var36 Var37 Var38 Var39 Var40 Var41 Var42 Var43 Var44 Var45 Var46 Var47 Var48 Var49
____________________ ____ ____ ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
28-Jan-2021 12:16:19 0 0 0.01 0.05 0.17 0.54 1.65 3.04 3.57 5.79 15.37 30.25 31.76 33.01 34 33.89 33.9 33.8 33.81 33.85 33.71 33.72 33.75 33.59 33.55 33.67 33.49 33.44 33.41 33.44 33.49 33.42 33.38 31.73 31.33 24.23 9.61 3.81 3.23 3.01 1.35 0.4 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:25 0 0 5.72 16.21 30.81 31.75 33.08 33.99 33.95 33.88 33.87 33.87 33.91 33.75 33.73 33.79 33.63 33.63 33.67 33.52 33.41 33.46 33.52 33.61 33.47 33.33 31.68 31.12 22.89 9.15 2.91 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:31 0 0 9.33 23.79 31.62 32.14 33.81 33.88 33.96 33.92 33.82 33.86 33.84 33.73 33.77 33.72 33.6 33.64 33.67 33.41 33.41 33.44 33.51 33.45 33.59 32.43 31.33 29.89 15.59 6.02 3.47 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:37 0 0 0.81 2.16 3.09 3.69 7.04 19.71 30.89 31.98 33.45 33.84 33.93 33.87 33.78 33.86 33.92 33.79 33.71 33.74 33.58 33.6 33.65 33.53 33.38 33.41 33.5 33.58 33.56 32.89 31.51 30.98 19.58 7.49 3.54 3.15 2.71 0.94 0.29 0.09 0.02 0.01 0.01 0 NaN NaN NaN
28-Jan-2021 12:16:44 0 0 0.01 0.04 0.16 0.51 1.55 3.03 3.52 5.6 16.26 30.6 31.71 32.86 33.99 33.94 33.87 33.85 33.83 33.91 33.74 33.69 33.78 33.63 33.59 33.64 33.52 33.4 33.39 33.47 33.51 33.47 33.33 31.67 31.24 24.68 9.9 3.47 3.22 3.04 1.43 0.41 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:51 0 0 7.2 18.81 31.24 31.8 33.14 33.88 33.93 33.88 33.85 33.86 33.84 33.77 33.72 33.78 33.61 33.55 33.7 33.49 33.43 33.45 33.48 33.58 33.52 33.15 31.61 31.2 22.28 8.86 3.46 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:56 0 0 9.35 24.71 31.66 32.1 33.79 33.78 33.92 33.83 33.85 33.84 33.81 33.69 33.75 33.74 33.54 33.65 33.6 33.42 33.39 33.39 33.5 33.51 33.63 32.31 31.36 29.94 15.75 6.07 3.49 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:17:02 0 0 0.81 2.17 3.1 3.68 6.99 20.66 31.34 31.97 33.47 33.95 33.95 33.87 33.87 33.88 33.83 33.76 33.75 33.73 33.57 33.59 33.65 33.5 33.38 33.46 33.52 33.53 33.57 32.83 31.54 30.69 19.86 8.06 3.12 3.15 2.71 0.96 0.29 0.09 0.03 0.01 0.01 0 NaN NaN NaN
>>
Then as Chris shows, you can
figure, surf(tA{:,2:end})
that gives as his

댓글 수: 6

Cris LaPierre
Cris LaPierre 2021년 2월 2일
편집: Cris LaPierre 2021년 2월 3일
I got wrapped up making fixedWidthImportOptions work. This approach is much simpler. I'd even further simplify it to the following:
data = readtable("tex_file.dat",'FileType',"fixedwidth",'NumHeaderLines',1);
surf(data{:,3:end})
dpb
dpb 2021년 2월 2일
readtable internal parsing has been much improved, recently, it appears. I hadn't even thought to try it directly given previous experience wherein fixed-width files were completely broken prior to introduction of the fixedWidthImportOptions object. That's a major step forward.
I didn't think about setting the first field width to encompass both the date and time field as one; that's a good trick for future where the date field may well be significant as well although it appears it is superfluous here.
ga97cad
ga97cad 2021년 2월 2일
Thank you, @Cris LaPierre this one works actually better as it separates the first two columns, which makes it easier for me to get the minutes from the time stamps via a foor loop, so thats really great!
@dpb thank you for your efforts!!! I really appreciate it, even if i don't have the tiniest bit of a clue right now, while looking at your code, but i will take a closer look tomorrow to figure out what was behind your approach.
best regards, lukas
dpb
dpb 2021년 2월 3일
편집: dpb 2021년 2월 3일
Mine's essentially identical to Chris' with the fixedWidthImportObject except I didn't think to combine the date and time fields into one field as he did but converted the resulting two variables of date and time into one and then deleted the two superfluous ones.
You virtually never need loops in MATLAB and you can easily get the minutes from the combined datetime values with minute function--with the table I had above, using just the initial eight rows the head function returns for easy demo:
>> head(tA)
ans =
8×48 table
Date Var3 Var4 Var5 Var6 Var7 Var8 Var9 Var10 Var11 Var12 Var13 Var14 Var15 Var16 Var17 Var18 Var19 Var20 Var21 Var22 Var23 Var24 Var25 Var26 Var27 Var28 Var29 Var30 Var31 Var32 Var33 Var34 Var35 Var36 Var37 Var38 Var39 Var40 Var41 Var42 Var43 Var44 Var45 Var46 Var47 Var48 Var49
____________________ ____ ____ ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
28-Jan-2021 12:16:19 0 0 0.01 0.05 0.17 0.54 1.65 3.04 3.57 5.79 15.37 30.25 31.76 33.01 34 33.89 33.9 33.8 33.81 33.85 33.71 33.72 33.75 33.59 33.55 33.67 33.49 33.44 33.41 33.44 33.49 33.42 33.38 31.73 31.33 24.23 9.61 3.81 3.23 3.01 1.35 0.4 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:25 0 0 5.72 16.21 30.81 31.75 33.08 33.99 33.95 33.88 33.87 33.87 33.91 33.75 33.73 33.79 33.63 33.63 33.67 33.52 33.41 33.46 33.52 33.61 33.47 33.33 31.68 31.12 22.89 9.15 2.91 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:31 0 0 9.33 23.79 31.62 32.14 33.81 33.88 33.96 33.92 33.82 33.86 33.84 33.73 33.77 33.72 33.6 33.64 33.67 33.41 33.41 33.44 33.51 33.45 33.59 32.43 31.33 29.89 15.59 6.02 3.47 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:37 0 0 0.81 2.16 3.09 3.69 7.04 19.71 30.89 31.98 33.45 33.84 33.93 33.87 33.78 33.86 33.92 33.79 33.71 33.74 33.58 33.6 33.65 33.53 33.38 33.41 33.5 33.58 33.56 32.89 31.51 30.98 19.58 7.49 3.54 3.15 2.71 0.94 0.29 0.09 0.02 0.01 0.01 0 NaN NaN NaN
28-Jan-2021 12:16:44 0 0 0.01 0.04 0.16 0.51 1.55 3.03 3.52 5.6 16.26 30.6 31.71 32.86 33.99 33.94 33.87 33.85 33.83 33.91 33.74 33.69 33.78 33.63 33.59 33.64 33.52 33.4 33.39 33.47 33.51 33.47 33.33 31.67 31.24 24.68 9.9 3.47 3.22 3.04 1.43 0.41 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:51 0 0 7.2 18.81 31.24 31.8 33.14 33.88 33.93 33.88 33.85 33.86 33.84 33.77 33.72 33.78 33.61 33.55 33.7 33.49 33.43 33.45 33.48 33.58 33.52 33.15 31.61 31.2 22.28 8.86 3.46 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:56 0 0 9.35 24.71 31.66 32.1 33.79 33.78 33.92 33.83 33.85 33.84 33.81 33.69 33.75 33.74 33.54 33.65 33.6 33.42 33.39 33.39 33.5 33.51 33.63 32.31 31.36 29.94 15.75 6.07 3.49 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:17:02 0 0 0.81 2.17 3.1 3.68 6.99 20.66 31.34 31.97 33.47 33.95 33.95 33.87 33.87 33.88 33.83 33.76 33.75 33.73 33.57 33.59 33.65 33.5 33.38 33.46 33.52 33.53 33.57 32.83 31.54 30.69 19.86 8.06 3.12 3.15 2.71 0.96 0.29 0.09 0.03 0.01 0.01 0 NaN NaN NaN
>> minute(ans.Date)
ans =
16
16
16
16
16
16
16
17
>>
NB: Above at command line the variable ans is the table consisting of the first eight rows of tA; for the whole table just return
mins=minute(tA.Date);
and you've got the full array of the minutes. There's no need to keep time separate from date or extract subsections of a string time or anything such as that. The datetime class is full-fledged class with methods and functions to do anything needed with it.
ga97cad
ga97cad 2021년 2월 3일
thank you, @dpb, but i needet to substrate the first row from every of the following rows in order so start from zero, but the the for loop really wasn't that kind of a big deal! I applied minutes() and then it was just straightforward!
btw: the help that the two of you provided also helped me to solve another problem: I get data from a sensor with is separated by a comma instead of a dot (german programme und syntax), so matlab wasn't able to recognize it as a number and just printed NaN. I wasn't able to understand the solution that are provided in the forum so far, but now everything works perfectly fine!
Best regards, Lukas
dpb
dpb 2021년 2월 3일
편집: dpb 2021년 2월 3일
" i needet to substrate the first row from every of the following rows in order so start from zero,..."
Then just do so...
tA.ETime=tA.Date-tA.Date(1); % create duration variable since first sample
tA=tA(:,[1 end 2:end-1]); % rearrange put new column 2nd after .Date.
leaving
>> head(tA)
ans =
8×49 table
Date ETime Var3 Var4 Var5 Var6 Var7 Var8 Var9 Var10 Var11 Var12 Var13 Var14 Var15 Var16 Var17 Var18 Var19 Var20 Var21 Var22 Var23 Var24 Var25 Var26 Var27 Var28 Var29 Var30 Var31 Var32 Var33 Var34 Var35 Var36 Var37 Var38 Var39 Var40 Var41 Var42 Var43 Var44 Var45 Var46 Var47 Var48 Var49
____________________ ________ ____ ____ ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
28-Jan-2021 12:16:19 00:00:00 0 0 0.01 0.05 0.17 0.54 1.65 3.04 3.57 5.79 15.37 30.25 31.76 33.01 34 33.89 33.9 33.8 33.81 33.85 33.71 33.72 33.75 33.59 33.55 33.67 33.49 33.44 33.41 33.44 33.49 33.42 33.38 31.73 31.33 24.23 9.61 3.81 3.23 3.01 1.35 0.4 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:25 00:00:06 0 0 5.72 16.21 30.81 31.75 33.08 33.99 33.95 33.88 33.87 33.87 33.91 33.75 33.73 33.79 33.63 33.63 33.67 33.52 33.41 33.46 33.52 33.61 33.47 33.33 31.68 31.12 22.89 9.15 2.91 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:31 00:00:12 0 0 9.33 23.79 31.62 32.14 33.81 33.88 33.96 33.92 33.82 33.86 33.84 33.73 33.77 33.72 33.6 33.64 33.67 33.41 33.41 33.44 33.51 33.45 33.59 32.43 31.33 29.89 15.59 6.02 3.47 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:37 00:00:18 0 0 0.81 2.16 3.09 3.69 7.04 19.71 30.89 31.98 33.45 33.84 33.93 33.87 33.78 33.86 33.92 33.79 33.71 33.74 33.58 33.6 33.65 33.53 33.38 33.41 33.5 33.58 33.56 32.89 31.51 30.98 19.58 7.49 3.54 3.15 2.71 0.94 0.29 0.09 0.02 0.01 0.01 0 NaN NaN NaN
28-Jan-2021 12:16:44 00:00:25 0 0 0.01 0.04 0.16 0.51 1.55 3.03 3.52 5.6 16.26 30.6 31.71 32.86 33.99 33.94 33.87 33.85 33.83 33.91 33.74 33.69 33.78 33.63 33.59 33.64 33.52 33.4 33.39 33.47 33.51 33.47 33.33 31.67 31.24 24.68 9.9 3.47 3.22 3.04 1.43 0.41 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:51 00:00:32 0 0 7.2 18.81 31.24 31.8 33.14 33.88 33.93 33.88 33.85 33.86 33.84 33.77 33.72 33.78 33.61 33.55 33.7 33.49 33.43 33.45 33.48 33.58 33.52 33.15 31.61 31.2 22.28 8.86 3.46 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:56 00:00:37 0 0 9.35 24.71 31.66 32.1 33.79 33.78 33.92 33.83 33.85 33.84 33.81 33.69 33.75 33.74 33.54 33.65 33.6 33.42 33.39 33.39 33.5 33.51 33.63 32.31 31.36 29.94 15.75 6.07 3.49 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:17:02 00:00:43 0 0 0.81 2.17 3.1 3.68 6.99 20.66 31.34 31.97 33.47 33.95 33.95 33.87 33.87 33.88 33.83 33.76 33.75 33.73 33.57 33.59 33.65 33.5 33.38 33.46 33.52 33.53 33.57 32.83 31.54 30.69 19.86 8.06 3.12 3.15 2.71 0.96 0.29 0.09 0.03 0.01 0.01 0 NaN NaN NaN
>>
If you want it displayed as fractional minutes, just ask/say so... :)
>> tA.ETime.Format='m';
>> head(tA)
ans =
8×49 table
Date ETime Var3 Var4 Var5 Var6 Var7 Var8 Var9 Var10 Var11 Var12 Var13 Var14 Var15 Var16 Var17 Var18 Var19 Var20 Var21 Var22 Var23 Var24 Var25 Var26 Var27 Var28 Var29 Var30 Var31 Var32 Var33 Var34 Var35 Var36 Var37 Var38 Var39 Var40 Var41 Var42 Var43 Var44 Var45 Var46 Var47 Var48 Var49
____________________ ___________ ____ ____ ____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
28-Jan-2021 12:16:19 0 min 0 0 0.01 0.05 0.17 0.54 1.65 3.04 3.57 5.79 15.37 30.25 31.76 33.01 34 33.89 33.9 33.8 33.81 33.85 33.71 33.72 33.75 33.59 33.55 33.67 33.49 33.44 33.41 33.44 33.49 33.42 33.38 31.73 31.33 24.23 9.61 3.81 3.23 3.01 1.35 0.4 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:25 0.1 min 0 0 5.72 16.21 30.81 31.75 33.08 33.99 33.95 33.88 33.87 33.87 33.91 33.75 33.73 33.79 33.63 33.63 33.67 33.52 33.41 33.46 33.52 33.61 33.47 33.33 31.68 31.12 22.89 9.15 2.91 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:31 0.2 min 0 0 9.33 23.79 31.62 32.14 33.81 33.88 33.96 33.92 33.82 33.86 33.84 33.73 33.77 33.72 33.6 33.64 33.67 33.41 33.41 33.44 33.51 33.45 33.59 32.43 31.33 29.89 15.59 6.02 3.47 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:37 0.3 min 0 0 0.81 2.16 3.09 3.69 7.04 19.71 30.89 31.98 33.45 33.84 33.93 33.87 33.78 33.86 33.92 33.79 33.71 33.74 33.58 33.6 33.65 33.53 33.38 33.41 33.5 33.58 33.56 32.89 31.51 30.98 19.58 7.49 3.54 3.15 2.71 0.94 0.29 0.09 0.02 0.01 0.01 0 NaN NaN NaN
28-Jan-2021 12:16:44 0.41667 min 0 0 0.01 0.04 0.16 0.51 1.55 3.03 3.52 5.6 16.26 30.6 31.71 32.86 33.99 33.94 33.87 33.85 33.83 33.91 33.74 33.69 33.78 33.63 33.59 33.64 33.52 33.4 33.39 33.47 33.51 33.47 33.33 31.67 31.24 24.68 9.9 3.47 3.22 3.04 1.43 0.41 0.12 0.03 0.01 0.01 0
28-Jan-2021 12:16:51 0.53333 min 0 0 7.2 18.81 31.24 31.8 33.14 33.88 33.93 33.88 33.85 33.86 33.84 33.77 33.72 33.78 33.61 33.55 33.7 33.49 33.43 33.45 33.48 33.58 33.52 33.15 31.61 31.2 22.28 8.86 3.46 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:16:56 0.61667 min 0 0 9.35 24.71 31.66 32.1 33.79 33.78 33.92 33.83 33.85 33.84 33.81 33.69 33.75 33.74 33.54 33.65 33.6 33.42 33.39 33.39 33.5 33.51 33.63 32.31 31.36 29.94 15.75 6.07 3.49 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28-Jan-2021 12:17:02 0.71667 min 0 0 0.81 2.17 3.1 3.68 6.99 20.66 31.34 31.97 33.47 33.95 33.95 33.87 33.87 33.88 33.83 33.76 33.75 33.73 33.57 33.59 33.65 33.5 33.38 33.46 33.52 33.53 33.57 32.83 31.54 30.69 19.86 8.06 3.12 3.15 2.71 0.96 0.29 0.09 0.03 0.01 0.01 0 NaN NaN NaN
>>
plot and friends are datetime, duration-aware, so plotting and so on is transparent. About the only place you might have to actually use the elapsed or calendar time as a double array would be if were to use as an independent variable in a curvefit or such; those analysis tools aren't all overloaded for non-numeric variables (other than some can handle categorical variables).

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

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2020a

태그

질문:

2021년 2월 2일

편집:

dpb
2021년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by